Implement/match LegoCacheSound::Create and LegoLoadCacheSoundPresenter::StreamingTickle (#986)

* Implement/match LegoCacheSound::Create

* Naming

* Fix naming

* Fix parens
This commit is contained in:
Christian Semmler
2024-06-01 17:29:37 -04:00
committed by GitHub
parent 1423eb56fc
commit 03ffb9c5de
9 changed files with 165 additions and 54 deletions

View File

@@ -42,6 +42,9 @@ public:
void CopyMediaSrcPath(const char* p_mediaSrcPath);
// FUNCTION: LEGO1 0x100186e0
inline const char* GetMediaSrcPath() { return m_mediaSrcPath; }
// FUNCTION: BETA10 0x1013c2e0
inline MxS32 GetFramesPerSecond() const { return m_framesPerSecond; }

View File

@@ -36,8 +36,8 @@ public:
// MxDSSound::`scalar deleting destructor'
private:
MxU32 m_sizeOnDisk;
MxS32 m_volume; // 0xbc
MxU32 m_sizeOnDisk; // 0xb8
MxS32 m_volume; // 0xbc
};
#endif // MXDSSOUND_H

View File

@@ -299,8 +299,8 @@ void MxWavePresenter::SetVolume(MxS32 p_volume)
m_volume = p_volume;
if (m_dsBuffer != NULL) {
MxS32 volume = p_volume * MxOmni::GetInstance()->GetSoundManager()->GetVolume() / 100;
MxS32 otherVolume = MxOmni::GetInstance()->GetSoundManager()->GetAttenuation(volume);
m_dsBuffer->SetVolume(otherVolume);
MxS32 attenuation = MxOmni::GetInstance()->GetSoundManager()->GetAttenuation(volume);
m_dsBuffer->SetVolume(attenuation);
}
m_criticalSection.Leave();