|
@@ -222,8 +222,8 @@ SOUND_FillAudio(
|
|
|
if (!g_fNoMusic)
|
|
|
{
|
|
|
#ifdef PAL_HAS_MP3
|
|
|
- SDL_mutexP(gSndPlayer.lock);
|
|
|
-
|
|
|
+ SDL_mutexP(gSndPlayer.lock);
|
|
|
+
|
|
|
if (gSndPlayer.pMP3 != NULL)
|
|
|
{
|
|
|
mad_getSamples(gSndPlayer.pMP3, stream, len);
|
|
@@ -235,9 +235,9 @@ SOUND_FillAudio(
|
|
|
|
|
|
mad_getSamples(gSndPlayer.pMP3, stream, len);
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- SDL_mutexV(gSndPlayer.lock);
|
|
|
+ SDL_mutexV(gSndPlayer.lock);
|
|
|
#endif
|
|
|
RIX_FillBuffer(stream, len);
|
|
|
}
|
|
@@ -369,7 +369,10 @@ SOUND_OpenAudio(
|
|
|
|
|
|
|
|
|
|
|
|
- RIX_Init(va("%s%s", PAL_PREFIX, "mus.mkf"));
|
|
|
+ if (RIX_Init(va("%s%s", PAL_PREFIX, "mus.mkf")) < 0)
|
|
|
+ {
|
|
|
+ RIX_Init(va("%s%s", PAL_PREFIX, "MUS.MKF"));
|
|
|
+ }
|
|
|
|
|
|
#ifdef PAL_HAS_CD
|
|
|
|
|
@@ -631,14 +634,14 @@ SOUND_PlayChannel(
|
|
|
free(bufdec);
|
|
|
return;
|
|
|
}
|
|
|
- memcpy(wavecvt.buf, bufdec, wavespec.size);
|
|
|
- if (g_fUseWav)
|
|
|
- {
|
|
|
- SDL_FreeWAV(bufdec);
|
|
|
- }
|
|
|
- else
|
|
|
+ memcpy(wavecvt.buf, bufdec, wavespec.size);
|
|
|
+ if (g_fUseWav)
|
|
|
{
|
|
|
- free(bufdec);
|
|
|
+ SDL_FreeWAV(bufdec);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ free(bufdec);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -678,13 +681,13 @@ PAL_PlayMUS(
|
|
|
#endif
|
|
|
|
|
|
#ifdef PAL_HAS_MP3
|
|
|
- SDL_mutexP(gSndPlayer.lock);
|
|
|
-
|
|
|
+ SDL_mutexP(gSndPlayer.lock);
|
|
|
+
|
|
|
if (gSndPlayer.pMP3 != NULL)
|
|
|
{
|
|
|
if (iNumRIX == gSndPlayer.iCurrentMP3 && !g_fNoMusic)
|
|
|
{
|
|
|
- SDL_mutexV(gSndPlayer.lock);
|
|
|
+ SDL_mutexV(gSndPlayer.lock);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -692,9 +695,9 @@ PAL_PlayMUS(
|
|
|
mad_closeFile(gSndPlayer.pMP3);
|
|
|
|
|
|
gSndPlayer.pMP3 = NULL;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- SDL_mutexV(gSndPlayer.lock);
|
|
|
+ SDL_mutexV(gSndPlayer.lock);
|
|
|
|
|
|
gSndPlayer.iCurrentMP3 = -1;
|
|
|
|