From bfdcb7c73ada51dcb35f57b1d70e12d643e1ced4 Mon Sep 17 00:00:00 2001 From: robojumper Date: Tue, 27 May 2025 20:51:47 +0200 Subject: snd_ExternalSoundPlayer OK --- src/nw4r/snd/snd_ExternalSoundPlayer.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src') diff --git a/src/nw4r/snd/snd_ExternalSoundPlayer.cpp b/src/nw4r/snd/snd_ExternalSoundPlayer.cpp index 2cd0c7e7..7f0b1d5a 100644 --- a/src/nw4r/snd/snd_ExternalSoundPlayer.cpp +++ b/src/nw4r/snd/snd_ExternalSoundPlayer.cpp @@ -42,10 +42,37 @@ ExternalSoundPlayer::~ExternalSoundPlayer() { } } +#if 0 // not sure which one uses this exactly, maybe StopAllSound? DECOMP_FORCE_CLASS_METHOD( BasicSound::ExtSoundPlayerPlayLinkList, GetPointerFromNode(static_cast(nullptr))); +#endif + +void ExternalSoundPlayer::StopAllSound(int fadeFrames) +{ + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) + { + it++->Stop(fadeFrames); + } +} + +void ExternalSoundPlayer::PauseAllSound(bool flag, int fadeFrames) +{ + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) + { + it++->Pause(flag, fadeFrames); + } +} + +void ExternalSoundPlayer::DetachSoundActorAll(SoundActor *sound) +{ + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) + { + it++->DetachSoundActor(sound); + } +} + bool ExternalSoundPlayer::AppendSound(BasicSound *sound) { -- cgit v1.2.3