audio: PlayDevice() should return an error code.

Higher level code treats errors as fatal and disconnects the device.
This commit is contained in:
Ryan C. Gordon
2023-08-30 19:16:39 -04:00
parent a94d724f17
commit 4e0c7c91fc
23 changed files with 73 additions and 52 deletions

View File

@@ -87,9 +87,10 @@ static int ANDROIDAUDIO_OpenDevice(SDL_AudioDevice *device)
// !!! FIXME: this needs a WaitDevice implementation.
static void ANDROIDAUDIO_PlayDevice(SDL_AudioDevice *device, const Uint8 *buffer, int buflen)
static int ANDROIDAUDIO_PlayDevice(SDL_AudioDevice *device, const Uint8 *buffer, int buflen)
{
Android_JNI_WriteAudioBuffer();
return 0;
}
static Uint8 *ANDROIDAUDIO_GetDeviceBuf(SDL_AudioDevice *device, int *buffer_size)