snd_SoundActor OK

This commit is contained in:
robojumper
2025-05-27 23:22:39 +02:00
parent 5bbbf09347
commit e95b03506b
5 changed files with 101 additions and 31 deletions
+14 -1
View File
@@ -30,8 +30,17 @@ namespace nw4r { namespace snd
// methods
public:
// cdtors
SoundActor();
SoundActor(SoundArchivePlayer &player);
virtual ~SoundActor();
virtual u32 detail_ConvertLabelStringToSoundId(const char* label) override;
virtual StartResult detail_SetupSound(SoundHandle *pHandle, u32 soundId, bool holdFlag, const StartInfo *pStartInfo) override;
virtual StartResult SetupSound(SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void*);
virtual StartResult detail_SetupSoundWithAmbientInfo(SoundHandle*, u32, const StartInfo*, detail::BasicSound::AmbientInfo*, void*);
// methods
detail::ExternalSoundPlayer *detail_GetActorPlayer(int actorPlayerId)
{
@@ -46,6 +55,10 @@ namespace nw4r { namespace snd
return mActorParam;
}
void StopAllSound(int fadeFrames);
void PauseAllSound(bool flag, int fadeFrames);
int GetPlayingSoundCount(int playerId) const;
// static members
public:
static int const ACTOR_PLAYER_COUNT = 4;
+5 -4
View File
@@ -222,6 +222,11 @@ namespace nw4r { namespace snd
void UpdateCommonSoundParam(detail::BasicSound *sound,
SoundArchive::SoundInfo const *commonInfo);
SoundStartable::StartResult detail_SetupSoundImpl(
SoundHandle *handle, u32 soundId,
detail::BasicSound::AmbientInfo *ambientArgInfo, SoundActor *actor,
bool holdFlag, SoundStartable::StartInfo const *startInfo);
private:
template <typename Sound>
Sound *AllocSound(
@@ -229,10 +234,6 @@ namespace nw4r { namespace snd
int priority, int ambientPriority,
detail::BasicSound::AmbientInfo *ambientArgInfo);
SoundStartable::StartResult detail_SetupSoundImpl(
SoundHandle *handle, u32 soundId,
detail::BasicSound::AmbientInfo *ambientArgInfo, SoundActor *actor,
bool holdFlag, SoundStartable::StartInfo const *startInfo);
SoundStartable::StartResult PrepareSeqImpl(
detail::SeqSound *sound, SoundArchive::SoundInfo const *commonInfo,
SoundArchive::SeqSoundInfo const *info,