audio: PlayDevice now passes the buffer, too, for convenience.

This commit is contained in:
Ryan C. Gordon
2023-07-03 20:34:15 -04:00
parent e518149d14
commit 258bc9efed
5 changed files with 11 additions and 15 deletions

View File

@@ -41,11 +41,9 @@ static void DISKAUDIO_WaitDevice(SDL_AudioDevice *device)
SDL_Delay(device->hidden->io_delay);
}
static void DISKAUDIO_PlayDevice(SDL_AudioDevice *device, int buffer_size)
static void DISKAUDIO_PlayDevice(SDL_AudioDevice *device, const Uint8 *buffer, int buffer_size)
{
const Sint64 written = SDL_RWwrite(device->hidden->io,
device->hidden->mixbuf,
buffer_size);
const Sint64 written = SDL_RWwrite(device->hidden->io, buffer, buffer_size);
/* If we couldn't write, assume fatal error for now */
if (written != buffer_size) {