src/audio/SDL_sysaudio.h
changeset 10681 34b25c97b17f
parent 10680 fe759a74b018
child 10737 3406a0f8b041
     1.1 --- a/src/audio/SDL_sysaudio.h	Tue Dec 06 02:20:58 2016 -0500
     1.2 +++ b/src/audio/SDL_sysaudio.h	Tue Dec 06 02:23:54 2016 -0500
     1.3 @@ -25,6 +25,7 @@
     1.4  
     1.5  #include "SDL_mutex.h"
     1.6  #include "SDL_thread.h"
     1.7 +#include "../SDL_dataqueue.h"
     1.8  
     1.9  /* !!! FIXME: These are wordy and unlocalized... */
    1.10  #define DEFAULT_OUTPUT_DEVNAME "System audio output device"
    1.11 @@ -49,7 +50,6 @@
    1.12     as appropriate so SDL's list of devices is accurate. */
    1.13  extern void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device);
    1.14  
    1.15 -
    1.16  /* This is the size of a packet when using SDL_QueueAudio(). We allocate
    1.17     these as necessary and pool them, under the assumption that we'll
    1.18     eventually end up with a handful that keep recycling, meeting whatever
    1.19 @@ -61,15 +61,6 @@
    1.20     The system preallocates enough packets for 2 callbacks' worth of data. */
    1.21  #define SDL_AUDIOBUFFERQUEUE_PACKETLEN (8 * 1024)
    1.22  
    1.23 -/* Used by apps that queue audio instead of using the callback. */
    1.24 -typedef struct SDL_AudioBufferQueue
    1.25 -{
    1.26 -    Uint8 data[SDL_AUDIOBUFFERQUEUE_PACKETLEN];  /* packet data. */
    1.27 -    Uint32 datalen;  /* bytes currently in use in this packet. */
    1.28 -    Uint32 startpos;  /* bytes currently consumed in this packet. */
    1.29 -    struct SDL_AudioBufferQueue *next;  /* next item in linked list. */
    1.30 -} SDL_AudioBufferQueue;
    1.31 -
    1.32  typedef struct SDL_AudioDriverImpl
    1.33  {
    1.34      void (*DetectDevices) (void);
    1.35 @@ -175,10 +166,7 @@
    1.36      SDL_threadID threadid;
    1.37  
    1.38      /* Queued buffers (if app not using callback). */
    1.39 -    SDL_AudioBufferQueue *buffer_queue_head; /* device fed from here. */
    1.40 -    SDL_AudioBufferQueue *buffer_queue_tail; /* queue fills to here. */
    1.41 -    SDL_AudioBufferQueue *buffer_queue_pool; /* these are unused packets. */
    1.42 -    Uint32 queued_bytes;  /* number of bytes of audio data in the queue. */
    1.43 +    SDL_DataQueue *buffer_queue;
    1.44  
    1.45      /* * * */
    1.46      /* Data private to this driver */