This commit is contained in:
Paul 2001-07-16 15:51:06 +00:00
parent 367d32bb91
commit f006cb910f
2 changed files with 18 additions and 0 deletions

View File

@ -169,6 +169,9 @@ void CXMPlaySound::think()
for(int i=0;i<24;i++,ch++)
{
PAUL_DBGMSG("%02d] u:%s l:%d pid:%04x",i,text[ch->m_useType],ch->m_locked,ch->m_playingId);
#ifdef SFX_DEBUG
PAUL_DBGMSG(" sfxId:%d",ch->m_sfxId);
#endif
}
PAUL_DBGMSG("=======");
dump=false;
@ -696,6 +699,9 @@ xmPlayingId CXMPlaySound::playSong(xmSampleId _sampleId,xmModId _modId,int _star
XM_Music, // Music
_startPattern); // Where to start from
markChannelsAsActive(baseChannel,channelCount,SONG,retId,id,255);
#ifdef SFX_DEBUG
m_spuChannelUse[baseChannel].m_sfxId=_startPattern;
#endif
setVolume(retId,MAX_VOLUME);
}
else
@ -843,6 +849,9 @@ xmPlayingId CXMPlaySound::playSfx(xmSampleId _sampleId,xmModId _modId,int _sfxPa
_sfxPattern); // SFX pattern to play
XM_ClearSFXRange();
markChannelsAsActive(baseChannel,channelCount,SFX,retId,id,_priority);
#ifdef SFX_DEBUG
m_spuChannelUse[baseChannel].m_sfxId=_sfxPattern;
#endif
setVolume(retId,MAX_VOLUME);
}
else

View File

@ -39,6 +39,12 @@ typedef enum {NOT_PLAYING=-1} xmPlayingId;
// 8 bits are the base channel of the playing sound.
// Define this to store the SFX number in the channel details. Useful for finding tracing sounds
// that are being left locked
//#define SFX_DEBUG
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
@ -134,6 +140,9 @@ private:
u8 m_priority;
u8 m_locked;
u8 m_vol,m_pan;
#ifdef SFX_DEBUG
u8 m_sfxId;
#endif
} spuChannelUse;
xmPlayingId getNextSparePlayingId(int _baseChannel);