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: A lot of structures of SoundSystem use an 32 element array. sample_0x190 for example
18+ // uses 31 and might be "missing" its first element. The 0 seems to be used for "something" else
19+ // in general. So either we should one day treat all these as "a value and a 31 element array" or
20+ // like a single 32 array.
21+ AIL_set_sample_volume (
22+ this ->sample_0x190 [i], (this ->sampleSndStructVolumePercentage_0x3174 [i + 1 ] * volume) / 100 );
23+ }
24+ return ;
25+ }
26+ this ->streamVolume [streamIndex] = volume;
27+ if (!this ->streamActiveUnk_0x20 [streamIndex]) {
28+ return ;
29+ }
30+ if (streamIndex == 0 ) {
31+ AIL_set_sample_volume (
32+ this ->musicSampleUnk_0x170 , (this ->streamFileVolumeCurrentUnk_0x5c [0 ] * volume) / 100 );
33+ return ;
34+ }
35+ AIL_set_stream_volume (
36+ this ->stream_0xc [streamIndex], (this ->streamFileVolumeCurrentUnk_0x5c [streamIndex] * volume) / 100 );
37+ }
38+
39+ }
40+ }
41+ }
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 | 100.0% | Reimplemented
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