Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 8770 → Rev 8771

/source/audiolib/include/fx_man.h
80,6 → 80,8
int FX_SetPrintf(void(*function)(const char *, ...));
 
extern int FX_ErrorCode;
extern int FX_MixRate;
 
#define FX_SetErrorCode(status) FX_ErrorCode = (status);
 
static FORCE_INLINE int FX_CheckMVErr(int status)
/source/audiolib/src/fx_man.cpp
43,6 → 43,7
 
int FX_ErrorCode = FX_Ok;
int FX_Installed;
int FX_MixRate;
 
const char *FX_ErrorString(int const ErrorNumber)
{
166,9 → 167,11
status = FX_Error;
}
 
FX_MixRate = MV_MixRate;
 
if (status == FX_Ok)
{
MV_Printf(": %.1f KHz %s with %d voices\n", mixrate/1000.f, numchannels == 1 ? "mono" : "stereo", numvoices);
MV_Printf(": %.1f KHz %s with %d voices\n", MV_MixRate/1000.f, numchannels == 1 ? "mono" : "stereo", numvoices);
FX_Installed = TRUE;
}
 
/source/duke3d/src/menus.cpp
3246,6 → 3246,17
return 0;
}
 
static void Menu_RefreshSoundProperties()
{
ud.config.MixRate = FX_MixRate;
ud.config.MusicDevice = MIDI_GetDevice();
 
soundrate = ud.config.MixRate;
soundvoices = ud.config.NumVoices;
musicdevice = ud.config.MusicDevice;
opl3stereo = AL_Stereo;
}
 
/*
Functions where a "newValue" or similar is passed are run *before* the linked variable is actually changed.
That way you can compare the new and old values and potentially block the change.
3422,6 → 3433,8
 
S_RestartMusic();
}
 
Menu_RefreshSoundProperties();
}
else if (entry == &ME_SAVESETUP_CLEANUP)
{
4457,17 → 4470,15
case MENU_SOUND_SF2:
Bstrcpy(sf2bankfile, SF2_BankFile);
break;
#endif
 
case MENU_SOUND_DEVSETUP:
#ifndef EDUKE32_RETAIL_MENU
ME_SOUND_SF2.name = (!sf2bankfile[0]) ? "Select sound bank..." : sf2bankfile;
if (m_previousMenu->menuID != MENU_SOUND_SF2)
// enter in file selector = MENU_SOUND_SF2, esc in file selector = MENU_SOUND_DEVSETUP
if (m_previousMenu->menuID != MENU_SOUND_SF2 && m_previousMenu->menuID != MENU_SOUND_DEVSETUP)
#endif
{
soundrate = ud.config.MixRate;
soundvoices = ud.config.NumVoices;
musicdevice = ud.config.MusicDevice;
opl3stereo = AL_Stereo;
}
Menu_RefreshSoundProperties();
break;
 
default: