void SoundManager::removeSound(Sound* sound) { if (sound == nullptr) return; removeSound(sound->getID()); }
void EnterEvadeMode() { Reset(); removeSound(); me->GetMotionMaster()->MoveTargetedHome(); if (instance) { instance->SetBossState(DATA_ATRAMEDES, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void JustDied(Unit* /*killer*/) { Talk(SAY_DEATH); removeSound(); if (instance) { instance->SetBossState(DATA_ATRAMEDES, DONE); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } if (Creature* nefarianHelperheroic = me->FindNearestCreature(NPC_NEFARIAN_HELPER_HEROIC, 150.0f, true)) { nefarianHelperheroic->RemoveAllAuras(); nefarianHelperheroic->AI()->Talk(25); nefarianHelperheroic->DespawnOrUnsummon(9000); } _JustDied(); }
static void playMusicISR (void* context, alt_u32 id) #endif { /* Interrupt for writing*/ unsigned int space = alt_up_audio_write_fifo_space(audio, ALT_UP_AUDIO_RIGHT); unsigned int* sample; int i; if (space > interruptBufSize - interruptSample) { // Don't need to fully fill the rest of the buffer. space = interruptBufSize - interruptSample; } if (space > 0) { if (addSound) { /* Add a sound in-- must add word by word. */ for (i = 0; i < space; i++) { int currentWord = interruptMusicBuffer[interruptSample++]; if (soundBufferSample < soundBufSize) { currentWord += soundBuffer[soundBufferSample++]; } else { removeSound(); } alt_up_audio_write_fifo(audio, ¤tWord, 1, ALT_UP_AUDIO_LEFT); alt_up_audio_write_fifo(audio, ¤tWord, 1, ALT_UP_AUDIO_RIGHT); } } else { sample = &(interruptMusicBuffer[interruptSample]); alt_up_audio_write_fifo(audio, sample, space, ALT_UP_AUDIO_LEFT); alt_up_audio_write_fifo(audio, sample, space, ALT_UP_AUDIO_RIGHT); interruptSample += space; } } if (interruptSample >= interruptBufSize) { if (musicLoop) { interruptSample = 0; } else { musicDone = 1; alt_up_audio_disable_write_interrupt(audio); if (bufSizeSwap != 0) { swapOutSound(); } } } }