mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 17:01:03 +00:00
Fix calls to FX_ErrorString and MUSIC_ErrorString
git-svn-id: https://svn.eduke32.com/eduke32@8260 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/duke3d/src/sounds.cpp # source/duke3d/src/sounds_mapster32.cpp # source/sw/src/sounds.cpp
This commit is contained in:
parent
553dfb3544
commit
7650cbe592
2 changed files with 21 additions and 22 deletions
|
@ -1120,7 +1120,6 @@ LoadSong(const char *filename)
|
|||
void
|
||||
SoundStartup(void)
|
||||
{
|
||||
int32_t status;
|
||||
void *initdata = 0;
|
||||
|
||||
|
||||
|
@ -1131,11 +1130,10 @@ SoundStartup(void)
|
|||
//snd_enabled = TRUE;
|
||||
|
||||
|
||||
|
||||
status = FX_Init(NumVoices, NumChannels, MixRate, initdata);
|
||||
int status = FX_Init(NumVoices, NumChannels, MixRate, initdata);
|
||||
if (status != FX_Ok)
|
||||
{
|
||||
buildprintf("Sound error: %s\n",FX_ErrorString(FX_Error));
|
||||
buildprintf("Sound error: %s\n", FX_ErrorString(status));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1157,15 +1155,13 @@ SoundStartup(void)
|
|||
void
|
||||
SoundShutdown(void)
|
||||
{
|
||||
int32_t status;
|
||||
|
||||
if (!FxInitialized)
|
||||
return;
|
||||
|
||||
status = FX_Shutdown();
|
||||
int status = FX_Shutdown();
|
||||
if (status != FX_Ok)
|
||||
{
|
||||
buildprintf("Sound error: %s\n",FX_ErrorString(FX_Error));
|
||||
buildprintf("Sound error: %s\n", FX_ErrorString(status));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1200,9 +1196,10 @@ void MusicStartup(void)
|
|||
|
||||
buildprintf("Initializing MIDI driver... ");
|
||||
|
||||
if (MUSIC_Init(MusicDevice) != MUSIC_Ok && MUSIC_Init(0) != MUSIC_Ok && MUSIC_Init(1) != MUSIC_Ok)
|
||||
int status;
|
||||
if ((status = MUSIC_Init(MusicDevice)) != MUSIC_Ok && (status = MUSIC_Init(0)) != MUSIC_Ok && (status = MUSIC_Init(1)) != MUSIC_Ok)
|
||||
{
|
||||
buildprintf("Music error: %s\n",MUSIC_ErrorString(MUSIC_Error));
|
||||
buildprintf("Music error: %s\n", MUSIC_ErrorString(status));
|
||||
mus_enabled = FALSE;
|
||||
return;
|
||||
}
|
||||
|
@ -1232,14 +1229,12 @@ void COVER_SetReverb(int amt)
|
|||
void
|
||||
MusicShutdown(void)
|
||||
{
|
||||
int32_t status;
|
||||
|
||||
StopSong();
|
||||
|
||||
status = MUSIC_Shutdown();
|
||||
int status = MUSIC_Shutdown();
|
||||
if (status != MUSIC_Ok)
|
||||
{
|
||||
buildprintf("Music error: %s\n",MUSIC_ErrorString(MUSIC_Error));
|
||||
buildprintf("Music error: %s\n", MUSIC_ErrorString(status));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue