MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / PauseAllSounds

Function PauseAllSounds

TombEngine/Sound/sound.cpp:339–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339void PauseAllSounds(SoundPauseMode mode)
340{
341 if (mode == SoundPauseMode::Global)
342 {
343 BASS_Pause();
344 return;
345 }
346
347 for (const auto& slot : SoundSlot)
348 {
349 if ((slot.Channel != NULL) && (BASS_ChannelIsActive(slot.Channel) == BASS_ACTIVE_PLAYING))
350 BASS_ChannelPause(slot.Channel);
351 }
352
353 for (int i = 0; i < (int)SoundTrackType::Count; i++)
354 {
355 if (mode == SoundPauseMode::Inventory && (SoundTrackType)i != SoundTrackType::Voice)
356 continue;
357
358 const auto& slot = SoundtrackSlot[i];
359 if ((slot.Channel != NULL) && (BASS_ChannelIsActive(slot.Channel) == BASS_ACTIVE_PLAYING))
360 BASS_ChannelPause(slot.Channel);
361 }
362}
363
364void ResumeAllSounds(SoundPauseMode mode)
365{

Callers 4

WinAppProcFunction · 0.85
PlayMethod · 0.85
CallPauseMethod · 0.85
CallInventoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected