This commit is contained in:
parent
f635c6d68d
commit
ba727d8406
@ -630,6 +630,18 @@ void CSoundMediator::stopAllSfx()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
int CSoundMediator::isSfxStillPlaying(xmPlayingId _playingId)
|
||||||
|
{
|
||||||
|
return s_xmplaySound->isStillPlaying(_playingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
|
@ -198,6 +198,7 @@ public:
|
|||||||
static void setposition(xmPlayingId _playingId,VECTOR *pos);
|
static void setposition(xmPlayingId _playingId,VECTOR *pos);
|
||||||
static void stopAndUnlockSfx(xmPlayingId _playingId);
|
static void stopAndUnlockSfx(xmPlayingId _playingId);
|
||||||
static void stopAllSfx();
|
static void stopAllSfx();
|
||||||
|
static int isSfxStillPlaying(xmPlayingId _playingId);
|
||||||
|
|
||||||
// Speech interface
|
// Speech interface
|
||||||
static void playSpeech(SpeechEquate _speech);
|
static void playSpeech(SpeechEquate _speech);
|
||||||
|
@ -620,6 +620,27 @@ xmPlayingId CXMPlaySound::playSong(xmSampleId _sampleId,xmModId _modId,int _star
|
|||||||
return retId;
|
return retId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
int CXMPlaySound::isStillPlaying(xmPlayingId _playingId)
|
||||||
|
{
|
||||||
|
spuChannelUse *ch;
|
||||||
|
|
||||||
|
ch=&m_spuChannelUse[_playingId&0xff];
|
||||||
|
if(ch->m_playingId==_playingId)
|
||||||
|
{
|
||||||
|
ASSERT(ch->m_locked!=false); // Can't do this on an unlocked sound!
|
||||||
|
return ch->m_useType!=SILENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASSERT(0); // Couldn't find the sound to check it!
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
@ -635,7 +656,7 @@ void CXMPlaySound::unlockPlayingId(xmPlayingId _playingId)
|
|||||||
if(ch->m_playingId==_playingId)
|
if(ch->m_playingId==_playingId)
|
||||||
{
|
{
|
||||||
//PAUL_DBGMSG("unlocking %d",_playingId);
|
//PAUL_DBGMSG("unlocking %d",_playingId);
|
||||||
ASSERT(ch->m_locked!=false);
|
ASSERT(ch->m_locked!=false); // Can't do this on an unlocked sound!
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ch->m_locked=false;
|
ch->m_locked=false;
|
||||||
|
@ -80,6 +80,8 @@ public:
|
|||||||
xmPlayingId playSfx(xmSampleId _sampleId,xmModId _modId,int _sfxPattern,int _playMask,u8 _priority);
|
xmPlayingId playSfx(xmSampleId _sampleId,xmModId _modId,int _sfxPattern,int _playMask,u8 _priority);
|
||||||
xmPlayingId playLoopingSfx(xmSampleId _sampleId,xmModId _modId,int _soundId,u8 _priority,int _pitch=0x400);
|
xmPlayingId playLoopingSfx(xmSampleId _sampleId,xmModId _modId,int _soundId,u8 _priority,int _pitch=0x400);
|
||||||
|
|
||||||
|
int isStillPlaying(xmPlayingId _playingId);
|
||||||
|
|
||||||
void unlockPlayingId(xmPlayingId _playingId);
|
void unlockPlayingId(xmPlayingId _playingId);
|
||||||
void stopPlayingId(xmPlayingId _playingId);
|
void stopPlayingId(xmPlayingId _playingId);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user