File tree Expand file tree Collapse file tree
src/OpenSHC/Audio/mss/SoundSystem Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #include " OpenSHC/Audio/MSS/SoundSystem.func.hpp"
2+
3+ namespace OpenSHC {
4+ namespace Audio {
5+ namespace MSS {
6+
7+ // FUNCTION: STRONGHOLDCRUSADER 0x00479E60
8+ void SoundSystem::setVolumeUnk (int streamIndex, int volume)
9+ {
10+ if (!this ->waveOutOpenUnk_0x8 ) {
11+ return ;
12+ }
13+
14+ if (streamIndex == -1 ) {
15+ this ->sampleVolume = volume;
16+ for (int i = 0 ; i < 31 ; ++i) {
17+ // TODO: Most structures are either 32 or 1 and 31. We need to unify these.
18+ // Either everything else is of or sample should take in the int value before.
19+ AIL_set_sample_volume (
20+ this ->sample_0x190 [i], (this ->sampleSndStructVolumePercentage_0x3174 [i + 1 ] * volume) / 100 );
21+ }
22+ return ;
23+ }
24+ this ->streamVolume [streamIndex] = volume;
25+ if (!this ->streamActiveUnk_0x20 [streamIndex]) {
26+ return ;
27+ }
28+ if (streamIndex == 0 ) {
29+ AIL_set_sample_volume (
30+ this ->musicSampleUnk_0x170 , (this ->streamFileVolumeCurrentUnk_0x5c [0 ] * volume) / 100 );
31+ return ;
32+ }
33+ AIL_set_stream_volume (
34+ this ->stream_0xc [streamIndex], (this ->streamFileVolumeCurrentUnk_0x5c [streamIndex] * volume) / 100 );
35+ }
36+
37+ }
38+ }
39+ }
Original file line number Diff line number Diff line change @@ -10890,7 +10890,7 @@ SHC_3BB0A8C1_0x00479C80 | 0.0% | Pending
1089010890SHC_3BB0A8C1_0x00479CF0 | 100.0% | Reimplemented
1089110891SHC_3BB0A8C1_0x00479D90 | 0.0% | Pending
1089210892SHC_3BB0A8C1_0x00479DF0 | 0.0% | Pending
10893- SHC_3BB0A8C1_0x00479E60 | 0 .0% | Pending
10893+ SHC_3BB0A8C1_0x00479E60 | 100 .0% | Reimplemented
1089410894SHC_3BB0A8C1_0x00479F30 | 0.0% | Pending
1089510895SHC_3BB0A8C1_0x00479FC0 | 0.0% | Pending
1089610896SHC_3BB0A8C1_0x0047A080 | 0.0% | Pending
You can’t perform that action at this time.
0 commit comments