This commit is contained in:
parent
481d05cc06
commit
408cdeb29d
2 changed files with 11 additions and 0 deletions
|
@ -90,6 +90,9 @@ int CSoundMediator::s_songStartPattern=0;
|
||||||
xmSampleId CSoundMediator::s_sfxSampleId=NO_SAMPLE;
|
xmSampleId CSoundMediator::s_sfxSampleId=NO_SAMPLE;
|
||||||
xmModId CSoundMediator::s_sfxModId=NO_SONG;
|
xmModId CSoundMediator::s_sfxModId=NO_SONG;
|
||||||
|
|
||||||
|
int CSoundMediator::s_canPlaySfx=true;
|
||||||
|
|
||||||
|
|
||||||
static CSpuSound *s_spuSound;
|
static CSpuSound *s_spuSound;
|
||||||
static CXMPlaySound *s_xmplaySound;
|
static CXMPlaySound *s_xmplaySound;
|
||||||
|
|
||||||
|
@ -557,6 +560,11 @@ void CSoundMediator::setSfxBank(SFXBANKID _bankId)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
xmPlayingId CSoundMediator::playSfx(SFXID _sfxId,int _lock=false)
|
xmPlayingId CSoundMediator::playSfx(SFXID _sfxId,int _lock=false)
|
||||||
{
|
{
|
||||||
|
if(!s_canPlaySfx)
|
||||||
|
{
|
||||||
|
return NOT_PLAYING;
|
||||||
|
}
|
||||||
|
|
||||||
int sfxChannelMask;
|
int sfxChannelMask;
|
||||||
xmPlayingId playId;
|
xmPlayingId playId;
|
||||||
SFXDETAILS *sfx;
|
SFXDETAILS *sfx;
|
||||||
|
|
|
@ -210,6 +210,7 @@ public:
|
||||||
static void setVolume(VOLUMETYPE _type,int _val);
|
static void setVolume(VOLUMETYPE _type,int _val);
|
||||||
static int getVolume(VOLUMETYPE _type);
|
static int getVolume(VOLUMETYPE _type);
|
||||||
static void stopAllSound();
|
static void stopAllSound();
|
||||||
|
static void setCanPlaySfx(int _flag) {s_canPlaySfx=_flag;}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -237,6 +238,8 @@ private:
|
||||||
static xmSampleId s_sfxSampleId;
|
static xmSampleId s_sfxSampleId;
|
||||||
static xmModId s_sfxModId;
|
static xmModId s_sfxModId;
|
||||||
|
|
||||||
|
static int s_canPlaySfx;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue