Tweaked a couple comments, added some FIXMEs.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 18 Mar 2015 10:09:23 -0400
changeset 9391 3a54985e999e
parent 9390 afd88e715bd7
child 9392 92e23eff9b89
Tweaked a couple comments, added some FIXMEs.
src/audio/SDL_audio.c
src/audio/SDL_sysaudio.h
--- a/src/audio/SDL_audio.c	Wed Mar 18 12:03:32 2015 -0400
+++ b/src/audio/SDL_audio.c	Wed Mar 18 10:09:23 2015 -0400
@@ -616,6 +616,7 @@
                 }
 
                 /* Read from the callback into the _input_ stream */
+                // !!! FIXME: this should be LockDevice.
                 SDL_LockMutex(device->mixer_lock);
                 (*fill) (udata, istream, istream_len);
                 SDL_UnlockMutex(device->mixer_lock);
@@ -687,6 +688,7 @@
                 }
             }
 
+            /* !!! FIXME: this should be LockDevice. */
             SDL_LockMutex(device->mixer_lock);
             if (device->paused) {
                 SDL_memset(stream, silence, stream_len);
@@ -1138,7 +1140,7 @@
     device->paused = 1;
     device->iscapture = iscapture;
 
-    /* Create a semaphore for locking the sound buffers */
+    /* Create a mutex for locking the sound buffers */
     if (!current_audio.impl.SkipMixerLock) {
         device->mixer_lock = SDL_CreateMutex();
         if (device->mixer_lock == NULL) {
--- a/src/audio/SDL_sysaudio.h	Wed Mar 18 12:03:32 2015 -0400
+++ b/src/audio/SDL_sysaudio.h	Wed Mar 18 10:09:23 2015 -0400
@@ -71,6 +71,7 @@
     /* !!! FIXME: add pause(), so we can optimize instead of mixing silence. */
 
     /* 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 HasCaptureSupport;
@@ -125,6 +126,7 @@
     SDL_AudioStreamer streamer;
 
     /* Current state flags */
+    /* !!! FIXME: should be SDL_bool */
     int iscapture;
     int enabled;
     int paused;
@@ -133,7 +135,7 @@
     /* Fake audio buffer for when the audio hardware is busy */
     Uint8 *fake_stream;
 
-    /* A semaphore for locking the mixing buffers */
+    /* A mutex for locking the mixing buffers */
     SDL_mutex *mixer_lock;
 
     /* A thread to feed the audio device */