mirror of
https://github.com/encounter/SDL.git
synced 2025-12-16 16:37:09 +00:00
coreaudio: Use the standard SDL audio thread instead of spinning a new one.
Fixes corner cases, like the audio callback not firing if the device is disconnected, etc.
This commit is contained in:
@@ -45,16 +45,14 @@
|
||||
|
||||
struct SDL_PrivateAudioData
|
||||
{
|
||||
SDL_Thread *thread;
|
||||
AudioQueueRef audioQueue;
|
||||
int numAudioBuffers;
|
||||
AudioQueueBufferRef *audioBuffer;
|
||||
void *buffer;
|
||||
UInt32 bufferOffset;
|
||||
UInt32 bufferSize;
|
||||
AudioStreamBasicDescription strdesc;
|
||||
SDL_sem *ready_semaphore;
|
||||
char *thread_error;
|
||||
SDL_atomic_t shutdown;
|
||||
SDL_bool refill;
|
||||
SDL_AudioStream *capturestream;
|
||||
#if MACOSX_COREAUDIO
|
||||
AudioDeviceID deviceID;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user