Tweaked a couple comments, added some FIXMEs.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 18 Mar 2015 10:09:23 -0400
changeset 93913a54985e999e
parent 9390 afd88e715bd7
child 9392 92e23eff9b89
Tweaked a couple comments, added some FIXMEs.
src/audio/SDL_audio.c
src/audio/SDL_sysaudio.h
     1.1 --- a/src/audio/SDL_audio.c	Wed Mar 18 12:03:32 2015 -0400
     1.2 +++ b/src/audio/SDL_audio.c	Wed Mar 18 10:09:23 2015 -0400
     1.3 @@ -616,6 +616,7 @@
     1.4                  }
     1.5  
     1.6                  /* Read from the callback into the _input_ stream */
     1.7 +                // !!! FIXME: this should be LockDevice.
     1.8                  SDL_LockMutex(device->mixer_lock);
     1.9                  (*fill) (udata, istream, istream_len);
    1.10                  SDL_UnlockMutex(device->mixer_lock);
    1.11 @@ -687,6 +688,7 @@
    1.12                  }
    1.13              }
    1.14  
    1.15 +            /* !!! FIXME: this should be LockDevice. */
    1.16              SDL_LockMutex(device->mixer_lock);
    1.17              if (device->paused) {
    1.18                  SDL_memset(stream, silence, stream_len);
    1.19 @@ -1138,7 +1140,7 @@
    1.20      device->paused = 1;
    1.21      device->iscapture = iscapture;
    1.22  
    1.23 -    /* Create a semaphore for locking the sound buffers */
    1.24 +    /* Create a mutex for locking the sound buffers */
    1.25      if (!current_audio.impl.SkipMixerLock) {
    1.26          device->mixer_lock = SDL_CreateMutex();
    1.27          if (device->mixer_lock == NULL) {
     2.1 --- a/src/audio/SDL_sysaudio.h	Wed Mar 18 12:03:32 2015 -0400
     2.2 +++ b/src/audio/SDL_sysaudio.h	Wed Mar 18 10:09:23 2015 -0400
     2.3 @@ -71,6 +71,7 @@
     2.4      /* !!! FIXME: add pause(), so we can optimize instead of mixing silence. */
     2.5  
     2.6      /* Some flags to push duplicate code into the core and reduce #ifdefs. */
     2.7 +    /* !!! FIXME: these should be SDL_bool */
     2.8      int ProvidesOwnCallbackThread;
     2.9      int SkipMixerLock;  /* !!! FIXME: do we need this anymore? */
    2.10      int HasCaptureSupport;
    2.11 @@ -125,6 +126,7 @@
    2.12      SDL_AudioStreamer streamer;
    2.13  
    2.14      /* Current state flags */
    2.15 +    /* !!! FIXME: should be SDL_bool */
    2.16      int iscapture;
    2.17      int enabled;
    2.18      int paused;
    2.19 @@ -133,7 +135,7 @@
    2.20      /* Fake audio buffer for when the audio hardware is busy */
    2.21      Uint8 *fake_stream;
    2.22  
    2.23 -    /* A semaphore for locking the mixing buffers */
    2.24 +    /* A mutex for locking the mixing buffers */
    2.25      SDL_mutex *mixer_lock;
    2.26  
    2.27      /* A thread to feed the audio device */