diff --git a/src/OpenSHC/Audio/mss/SoundSystem/setupSampleForNextSound.cpp b/src/OpenSHC/Audio/mss/SoundSystem/setupSampleForNextSound.cpp new file mode 100644 index 0000000..948bee1 --- /dev/null +++ b/src/OpenSHC/Audio/mss/SoundSystem/setupSampleForNextSound.cpp @@ -0,0 +1,24 @@ +#include "OpenSHC/Audio/MSS/SoundSystem.func.hpp" + +namespace OpenSHC { +namespace Audio { + namespace MSS { + + // FUNCTION: STRONGHOLDCRUSADER 0x00479CF0 + void SoundSystem::setupSampleForNextSound(int soundIndex, int sampleVolumePercentage, int samplePan) + { + if (!this->waveOutOpenUnk_0x8 || (this->soundFileCurrSampleNum_0x28c[soundIndex] < 0)) { + return; + } + + this->sampleSndStructVolumePercentage_0x3174[this->soundFileCurrSampleNum_0x28c[soundIndex]] + = sampleVolumePercentage; + AIL_set_sample_volume(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1], + (this->sampleVolume * sampleVolumePercentage) / 100); + AIL_set_sample_pan(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1], samplePan); + AIL_set_sample_loop_count(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1], 1); + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index 84fe74a..15c10d4 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -10887,7 +10887,7 @@ SHC_3BB0A8C1_0x00479AF0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479B70 | 0.0% | Pending SHC_3BB0A8C1_0x00479C20 | 0.0% | Pending SHC_3BB0A8C1_0x00479C80 | 0.0% | Pending -SHC_3BB0A8C1_0x00479CF0 | 0.0% | Pending +SHC_3BB0A8C1_0x00479CF0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479D90 | 0.0% | Pending SHC_3BB0A8C1_0x00479DF0 | 0.0% | Pending SHC_3BB0A8C1_0x00479E60 | 0.0% | Pending