void CSoundManager::Play( int ID, bool isLooping, bool isMusic )
{
	CSGD_XAudio2* pXA = CSGD_XAudio2::GetInstance();
	if( ID == -1 )
		return;

	if( isMusic )
	{
		if( pXA->MusicIsSongPlaying(ID) )
			pXA->MusicStopSong(ID);
		pXA->MusicPlaySong(ID,isLooping);
	}
	else
	{
		if( pXA->SFXIsSoundPlaying(ID) )
			pXA->SFXStopSound(ID);
		pXA->SFXPlaySound(ID, isLooping);
	}
}
Example #2
0
        void Client::playSpellSFX(SpellType _type)
        {
                CSGD_XAudio2* xAudio = CSGD_XAudio2::GetInstance();
                switch(_type)
                {
                case Spell_Fireball:
                        xAudio->SFXPlaySound(fireballSFX);   
                        break;
                case Spell_Phoenix:
                        xAudio->SFXPlaySound(phoenixSFX);
                        break;
                case Spell_Diablo:
                        xAudio->SFXPlaySound(diabloSFX);
                        break;
                case Spell_IceBall:
                        xAudio->SFXPlaySound(iceballSFX);
                        break;
                case Spell_FrostBite:
                        xAudio->SFXPlaySound(frostbiteSFX);
                        break;
                case Spell_GlacialSpike:
                        xAudio->SFXPlaySound(glacialSpikeSFX);
                        break;
                case Spell_LightningBolt:
                        xAudio->SFXPlaySound(lightningBoltSFX);
                        break;
                case Spell_LightningStrike:
                        xAudio->SFXPlaySound(lightningStrikeSFX);
                        break;
                case Spell_Valkyrie:
                        xAudio->SFXPlaySound(valkyrieSFX);
                        break;
                case Spell_Heal:
                case Spell_SelectedHeal:
                case Spell_GroupHeal:
                        xAudio->SFXPlaySound(healSFX);
                        break;

                default :
                         xAudio->SFXPlaySound(aoeFireballSFX);
                        return;

                }


        }