diff options
Diffstat (limited to '3rdparty/SDL2/src/audio/SDL_sysaudio.h')
-rw-r--r-- | 3rdparty/SDL2/src/audio/SDL_sysaudio.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/3rdparty/SDL2/src/audio/SDL_sysaudio.h b/3rdparty/SDL2/src/audio/SDL_sysaudio.h index 426a190f185..943169bf7c1 100644 --- a/3rdparty/SDL2/src/audio/SDL_sysaudio.h +++ b/3rdparty/SDL2/src/audio/SDL_sysaudio.h @@ -26,6 +26,10 @@ #include "SDL_mutex.h" #include "SDL_thread.h" +/* !!! FIXME: These are wordy and unlocalized... */ +#define DEFAULT_OUTPUT_DEVNAME "System audio output device" +#define DEFAULT_INPUT_DEVNAME "System audio capture device" + /* The SDL audio driver */ typedef struct SDL_AudioDevice SDL_AudioDevice; #define _THIS SDL_AudioDevice *_this @@ -75,7 +79,9 @@ typedef struct SDL_AudioDriverImpl void (*PlayDevice) (_THIS); int (*GetPendingBytes) (_THIS); Uint8 *(*GetDeviceBuf) (_THIS); - void (*WaitDone) (_THIS); + int (*CaptureFromDevice) (_THIS, void *buffer, int buflen); + void (*FlushCapture) (_THIS); + void (*PrepareToClose) (_THIS); /**< Called between run and draining wait for playback devices */ void (*CloseDevice) (_THIS); void (*LockDevice) (_THIS); void (*UnlockDevice) (_THIS); @@ -87,10 +93,10 @@ typedef struct SDL_AudioDriverImpl /* Some flags to push duplicate code into the core and reduce #ifdefs. */ /* !!! FIXME: these should be SDL_bool */ int ProvidesOwnCallbackThread; - int SkipMixerLock; /* !!! FIXME: do we need this anymore? */ + int SkipMixerLock; int HasCaptureSupport; int OnlyHasDefaultOutputDevice; - int OnlyHasDefaultInputDevice; + int OnlyHasDefaultCaptureDevice; int AllowsArbitraryDeviceNames; } SDL_AudioDriverImpl; @@ -157,12 +163,10 @@ struct SDL_AudioDevice SDL_AudioStreamer streamer; /* Current state flags */ - /* !!! FIXME: should be SDL_bool */ - int iscapture; - int enabled; /* true if device is functioning and connected. */ - int shutdown; /* true if we are signaling the play thread to end. */ - int paused; - int opened; + SDL_atomic_t shutdown; /* true if we are signaling the play thread to end. */ + SDL_atomic_t enabled; /* true if device is functioning and connected. */ + SDL_atomic_t paused; + SDL_bool iscapture; /* Fake audio buffer for when the audio hardware is busy */ Uint8 *fake_stream; @@ -183,6 +187,8 @@ struct SDL_AudioDevice /* * * */ /* Data private to this driver */ struct SDL_PrivateAudioData *hidden; + + void *handle; }; #undef _THIS |