From e3b4063ff4a1537af4ea076e40941db09a963dc3 Mon Sep 17 00:00:00 2001 From: robojumper Date: Thu, 29 May 2025 17:14:02 +0200 Subject: [PATCH] snd_SoundArchivePlayer OK --- config/SOUE01/symbols.txt | 32 ++++++++++----------- configure.py | 2 +- include/nw4r/snd/snd_SoundInstanceManager.h | 2 +- include/nw4r/snd/snd_SoundStartable.h | 18 ------------ 4 files changed, 18 insertions(+), 36 deletions(-) diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 0dfcce5d..ba0f3b34 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -25544,14 +25544,14 @@ LoadGroup__Q44nw4r3snd6detail18SoundArchiveLoaderFUlPQ34nw4r3snd22SoundMemoryAll ReadFile__Q44nw4r3snd6detail18SoundArchiveLoaderFUlPvll = .text:0x804782F0; // type:function size:0x18C LoadFile__Q44nw4r3snd6detail18SoundArchiveLoaderFUlPQ34nw4r3snd22SoundMemoryAllocatable = .text:0x80478480; // type:function size:0xDC __ct__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x80478560; // type:function size:0x120 -__dt__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallbackFv = .text:0x80478680; // type:function size:0x40 -__dt__Q44nw4r3snd18SoundArchivePlayer11WsdCallbackFv = .text:0x804786C0; // type:function size:0x40 -__ct__Q34nw4r2ut41LinkListFv = .text:0x80478700; // type:function size:0x18 -__dt__Q34nw4r2ut41LinkListFv = .text:0x80478720; // type:function size:0x58 -__ct__Q34nw4r2ut42LinkListFv = .text:0x80478780; // type:function size:0x18 -__dt__Q34nw4r2ut42LinkListFv = .text:0x804787A0; // type:function size:0x58 -__ct__Q34nw4r2ut42LinkListFv = .text:0x80478800; // type:function size:0x18 -__dt__Q34nw4r2ut42LinkListFv = .text:0x80478820; // type:function size:0x58 +__dt__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallbackFv = .text:0x80478680; // type:function size:0x40 scope:weak +__dt__Q44nw4r3snd18SoundArchivePlayer11WsdCallbackFv = .text:0x804786C0; // type:function size:0x40 scope:weak +__ct__Q34nw4r2ut41LinkListFv = .text:0x80478700; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut41LinkListFv = .text:0x80478720; // type:function size:0x58 scope:weak +__ct__Q34nw4r2ut42LinkListFv = .text:0x80478780; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut42LinkListFv = .text:0x804787A0; // type:function size:0x58 scope:weak +__ct__Q34nw4r2ut42LinkListFv = .text:0x80478800; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut42LinkListFv = .text:0x80478820; // type:function size:0x58 scope:weak __dt__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x80478880; // type:function size:0xB8 IsAvailable__Q34nw4r3snd18SoundArchivePlayerCFv = .text:0x80478940; // type:function size:0x1C Setup__Q34nw4r3snd18SoundArchivePlayerFPCQ34nw4r3snd12SoundArchivePvUlPvUl = .text:0x80478960; // type:function size:0x104 @@ -25578,9 +25578,9 @@ InvalidateData__Q34nw4r3snd18SoundArchivePlayerFPCvPCv = .text:0x8047AC60; // ty InvalidateWaveData__Q34nw4r3snd18SoundArchivePlayerFPCvPCv = .text:0x8047AD10; // type:function size:0xA8 NoteOn__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallbackFPQ44nw4r3snd6detail9SeqPlayeriRCQ44nw4r3snd6detail10NoteOnInfo = .text:0x8047ADC0; // type:function size:0x128 GetWaveSoundData__Q44nw4r3snd18SoundArchivePlayer11WsdCallbackCFPQ44nw4r3snd6detail13WaveSoundInfoPQ44nw4r3snd6detail17WaveSoundNoteInfoPQ44nw4r3snd6detail8WaveInfoPCviiUl = .text:0x8047AEF0; // type:function size:0xFC -@12@detail_ConvertLabelStringToSoundId__Q34nw4r3snd18SoundArchivePlayerFPCc = .text:0x8047AFF0; // type:function size:0x8 -@12@detail_SetupSound__Q34nw4r3snd18SoundArchivePlayerFPQ34nw4r3snd11SoundHandleUlbPCQ44nw4r3snd14SoundStartable9StartInfo = .text:0x8047B000; // type:function size:0x8 -@12@__dt__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x8047B010; // type:function size:0x8 +@12@detail_ConvertLabelStringToSoundId__Q34nw4r3snd18SoundArchivePlayerFPCc = .text:0x8047AFF0; // type:function size:0x8 scope:weak +@12@detail_SetupSound__Q34nw4r3snd18SoundArchivePlayerFPQ34nw4r3snd11SoundHandleUlbPCQ44nw4r3snd14SoundStartable9StartInfo = .text:0x8047B000; // type:function size:0x8 scope:weak +@12@__dt__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x8047B010; // type:function size:0x8 scope:weak detail_AttachSoundAsTempHandle__Q34nw4r3snd11SoundHandleFPQ44nw4r3snd6detail10BasicSound = .text:0x8047B020; // type:function size:0x4C detail_AttachSound__Q34nw4r3snd11SoundHandleFPQ44nw4r3snd6detail10BasicSound = .text:0x8047B070; // type:function size:0x4C DetachSound__Q34nw4r3snd11SoundHandleFv = .text:0x8047B0C0; // type:function size:0x50 @@ -38614,9 +38614,9 @@ __vt__Q34nw4r3snd13Sound3DEngine = .data:0x8056E118; // type:object size:0x1C __vt__Q34nw4r3snd14Sound3DManager = .data:0x8056E138; // type:object size:0x34 __vt__Q34nw4r3snd10SoundActor = .data:0x8056E170; // type:object size:0x1C __vt__Q34nw4r3snd12SoundArchive = .data:0x8056E190; // type:object size:0x20 -lbl_8056E1B0 = .data:0x8056E1B0; // type:object size:0x30 -WSDCallback = .data:0x8056E1E0; // type:object size:0x10 -SeqCallback = .data:0x8056E1F0; // type:object size:0x10 +__vt__Q34nw4r3snd18SoundArchivePlayer = .data:0x8056E1B0; // type:object size:0x30 +__vt__Q44nw4r3snd18SoundArchivePlayer11WsdCallback = .data:0x8056E1E0; // type:object size:0x10 +__vt__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallback = .data:0x8056E1F0; // type:object size:0x10 __vt__Q34nw4r3snd9SoundHeap = .data:0x8056E200; // type:object size:0x10 @2785 = .data:0x8056E210; // type:object size:0x46 scope:local data:string __vt__Q44nw4r3snd6detail10StrmPlayer = .data:0x8056E258; // type:object size:0x48 @@ -49745,8 +49745,8 @@ VOLUME_INIT__Q44nw4r3snd6detail12EnvGenerator = .sdata2:0x8057EFD0; // type:obje @2581 = .sdata2:0x8057F12C; // type:object size:0x4 scope:local align:4 data:float @3454 = .sdata2:0x8057F130; // type:object size:0x4 scope:local align:4 data:float @3455 = .sdata2:0x8057F134; // type:object size:0x4 scope:local align:4 data:float -lbl_8057F138 = .sdata2:0x8057F138; // type:object size:0x4 align:4 data:float -lbl_8057F140 = .sdata2:0x8057F140; // type:object size:0x8 align:8 data:double +@12402 = .sdata2:0x8057F138; // type:object size:0x4 scope:local align:4 data:float +@12410 = .sdata2:0x8057F140; // type:object size:0x8 scope:local align:8 data:double @2452 = .sdata2:0x8057F148; // type:object size:0x4 scope:local align:4 data:float @2453 = .sdata2:0x8057F14C; // type:object size:0x4 scope:local align:4 data:float @5421 = .sdata2:0x8057F150; // type:object size:0x4 scope:local align:4 data:float diff --git a/configure.py b/configure.py index 9d62279b..4ccee40c 100644 --- a/configure.py +++ b/configure.py @@ -1062,7 +1062,7 @@ config.libs = [ Object(Matching, "nw4r/snd/snd_SoundArchive.cpp"), Object(Matching, "nw4r/snd/snd_SoundArchiveFile.cpp"), Object(Matching, "nw4r/snd/snd_SoundArchiveLoader.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundArchivePlayer.cpp"), + Object(Matching, "nw4r/snd/snd_SoundArchivePlayer.cpp"), Object(Matching, "nw4r/snd/snd_SoundHandle.cpp"), Object(Matching, "nw4r/snd/snd_SoundHeap.cpp"), Object(Matching, "nw4r/snd/snd_SoundPlayer.cpp"), diff --git a/include/nw4r/snd/snd_SoundInstanceManager.h b/include/nw4r/snd/snd_SoundInstanceManager.h index c43d546e..092200ae 100644 --- a/include/nw4r/snd/snd_SoundInstanceManager.h +++ b/include/nw4r/snd/snd_SoundInstanceManager.h @@ -179,7 +179,7 @@ namespace nw4r { namespace snd { namespace detail private: MemoryPool mPool; // size 0x04, offset 0x00 typename Sound::PriorityLinkList mPriorityList; // size 0x0c, offset 0x04 - mutable OSMutex mMutex; // size 0x18, offset 0x10 + OSMutex mMutex; // size 0x18, offset 0x10 }; // size 0x28 }}} // namespace nw4r::snd::detail diff --git a/include/nw4r/snd/snd_SoundStartable.h b/include/nw4r/snd/snd_SoundStartable.h index e92a2d02..c672c7f3 100644 --- a/include/nw4r/snd/snd_SoundStartable.h +++ b/include/nw4r/snd/snd_SoundStartable.h @@ -111,12 +111,6 @@ namespace nw4r { namespace snd SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo ); - // TODO: Remove - StartResult detail_StartSound( - SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo, - detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo - ); - StartResult detail_HoldSound( SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo ); @@ -124,18 +118,6 @@ namespace nw4r { namespace snd SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo ); - // TODO: Remove - StartResult detail_HoldSound( - SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo, - detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo - ); - - // TODO: Remove - StartResult detail_PrepareSound( - SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo, - detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo - ); - StartResult detail_PrepareSound( SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo );