mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2024-10-20 10:37:37 -04:00
parent
99a1303d87
commit
d96c5ce81e
|
@ -269,7 +269,7 @@ float soundClipDuration(int soundClipId, float pitch) {
|
|||
return soundPlayerEstimateLength(alSound, pitch);
|
||||
}
|
||||
|
||||
void soundPlayerGameVolumeUpdate(enum SoundType type) {
|
||||
void soundPlayerGameVolumeUpdate() {
|
||||
int index = 0;
|
||||
while (index < gActiveSoundCount) {
|
||||
struct ActiveSound* sound = &gActiveSounds[index];
|
||||
|
@ -279,7 +279,7 @@ void soundPlayerGameVolumeUpdate(enum SoundType type) {
|
|||
}
|
||||
|
||||
float newVolume = sound->originalVolume * gSaveData.audio.soundVolume/0xFFFF;
|
||||
if (type == SoundTypeMusic){
|
||||
if (sound->soundType == SoundTypeMusic){
|
||||
newVolume = newVolume* gSaveData.audio.musicVolume/0xFFFF;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,11 +141,11 @@ enum MenuDirection audioOptionsUpdate(struct AudioOptions* audioOptions) {
|
|||
switch (audioOptions->selectedItem) {
|
||||
case AudioOptionGameVolume:
|
||||
audioOptionsHandleSlider(audioOptions->selectedItem, &gSaveData.audio.soundVolume, &audioOptions->gameVolume.value);
|
||||
soundPlayerGameVolumeUpdate(SoundTypeAll);
|
||||
soundPlayerGameVolumeUpdate();
|
||||
break;
|
||||
case AudioOptionMusicVolume:
|
||||
audioOptionsHandleSlider(audioOptions->selectedItem, &gSaveData.audio.musicVolume, &audioOptions->musicVolume.value);
|
||||
soundPlayerGameVolumeUpdate(SoundTypeMusic);
|
||||
soundPlayerGameVolumeUpdate();
|
||||
break;
|
||||
case AudioOptionSubtitlesEnabled:
|
||||
if (controllerGetButtonDown(0, A_BUTTON)) {
|
||||
|
|
Loading…
Reference in a new issue