snd_ExternalSoundPlayer OK

This commit is contained in:
robojumper
2025-05-27 20:51:47 +02:00
parent 11c4cb3130
commit bfdcb7c73a
3 changed files with 33 additions and 1 deletions
+1 -1
View File
@@ -1027,7 +1027,7 @@ config.libs = [
Object(NonMatching, "nw4r/snd/snd_debug.cpp"),
Object(Matching, "nw4r/snd/snd_DvdSoundArchive.cpp"),
Object(Matching, "nw4r/snd/snd_EnvGenerator.cpp"),
Object(NonMatching, "nw4r/snd/snd_ExternalSoundPlayer.cpp"),
Object(Matching, "nw4r/snd/snd_ExternalSoundPlayer.cpp"),
Object(Matching, "nw4r/snd/snd_FrameHeap.cpp"),
Object(NonMatching, "nw4r/snd/snd_FxBase.cpp"),
Object(NonMatching, "nw4r/snd/snd_FxChorus.cpp"),
@@ -11,6 +11,8 @@
* classes and functions
*/
namespace nw4r { namespace snd { class SoundActor; }}
namespace nw4r { namespace snd { namespace detail
{
// [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x27049
@@ -24,6 +26,9 @@ namespace nw4r { namespace snd { namespace detail
int GetPlayingSoundCount() const { return mSoundList.GetSize(); }
int GetPlayableSoundCount() const { return mPlayableCount; }
void SetPlayableSoundCount(int count);
void StopAllSound(int fadeFrames);
void PauseAllSound(bool flag, int fadeFrames);
void DetachSoundActorAll(SoundActor *sound);
bool AppendSound(BasicSound *sound);
void RemoveSound(BasicSound *sound);
+27
View File
@@ -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<ut::LinkListNode *>(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)
{