Minor ALSA tweaks (include-once macro name, len for memset() more clear).
authorRyan C. Gordon <icculus@icculus.org>
Sun, 07 Jul 2013 02:03:50 -0400
changeset 7365 a3fc9175306d
parent 7364 e21bd6987b86
child 7366 38c6f26bb010
Minor ALSA tweaks (include-once macro name, len for memset() more clear).
src/audio/alsa/SDL_alsa_audio.c
src/audio/alsa/SDL_alsa_audio.h
--- a/src/audio/alsa/SDL_alsa_audio.c	Sat Jul 06 21:17:09 2013 -0700
+++ b/src/audio/alsa/SDL_alsa_audio.c	Sun Jul 07 02:03:50 2013 -0400
@@ -643,7 +643,7 @@
         ALSA_CloseDevice(this);
         return SDL_OutOfMemory();
     }
-    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
+    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen);
 
     /* Switch to blocking mode for playback */
     ALSA_snd_pcm_nonblock(pcm_handle, 0);
--- a/src/audio/alsa/SDL_alsa_audio.h	Sat Jul 06 21:17:09 2013 -0700
+++ b/src/audio/alsa/SDL_alsa_audio.h	Sun Jul 07 02:03:50 2013 -0400
@@ -20,8 +20,8 @@
 */
 #include "SDL_config.h"
 
-#ifndef _ALSA_PCM_audio_h
-#define _ALSA_PCM_audio_h
+#ifndef _SDL_ALSA_audio_h
+#define _SDL_ALSA_audio_h
 
 #include <alsa/asoundlib.h>
 
@@ -40,6 +40,6 @@
     int mixlen;
 };
 
-#endif /* _ALSA_PCM_audio_h */
+#endif /* _SDL_ALSA_audio_h */
 
 /* vi: set ts=4 sw=4 expandtab: */