Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/OpenSHC/Audio/mss/SoundSystem/setupSampleForNextSound.cpp
Original file line number Diff line number Diff line change
@@ -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);
}

}
}
}
2 changes: 1 addition & 1 deletion status/addresses-SHC-3BB0A8C1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down