audio: WaitDevice/WaitCaptureDevice now returns a result.

This is an attempt to centralize all the error handling, instead of
implicitly counting on WaitDevice implementations to disconnect the device
to report an error.
This commit is contained in:
Ryan C. Gordon
2023-10-03 10:35:18 -04:00
parent a0820ed833
commit d2d4914ac3
18 changed files with 85 additions and 57 deletions

View File

@@ -35,9 +35,10 @@
#define DISKDEFAULT_INFILE "sdlaudio-in.raw"
#define DISKENVR_IODELAY "SDL_DISKAUDIODELAY"
static void DISKAUDIO_WaitDevice(SDL_AudioDevice *device)
static int DISKAUDIO_WaitDevice(SDL_AudioDevice *device)
{
SDL_Delay(device->hidden->io_delay);
return 0;
}
static int DISKAUDIO_PlayDevice(SDL_AudioDevice *device, const Uint8 *buffer, int buffer_size)