@@ -2107,9 +2107,8 @@ void MilesAudioManager::adjustVolumeOfPlayingAudio(AsciiString eventName, Real n
21072107 if (playing && playing->m_audioEventRTS ->getEventName () == eventName) {
21082108 // Adjust it
21092109 playing->m_audioEventRTS ->setVolume (newVolume);
2110- Real desiredVolume = playing->m_audioEventRTS ->getVolume () * playing->m_audioEventRTS ->getVolumeShift ();
21112110 AIL_sample_volume_pan (playing->m_sample , NULL , &pan);
2112- AIL_set_sample_volume_pan (playing->m_sample , desiredVolume , pan);
2111+ AIL_set_sample_volume_pan (playing->m_sample , getEffectiveVolume (playing-> m_audioEventRTS ) , pan);
21132112 }
21142113 }
21152114
@@ -2118,8 +2117,7 @@ void MilesAudioManager::adjustVolumeOfPlayingAudio(AsciiString eventName, Real n
21182117 if (playing && playing->m_audioEventRTS ->getEventName () == eventName) {
21192118 // Adjust it
21202119 playing->m_audioEventRTS ->setVolume (newVolume);
2121- Real desiredVolume = playing->m_audioEventRTS ->getVolume () * playing->m_audioEventRTS ->getVolumeShift ();
2122- AIL_set_3D_sample_volume (playing->m_3DSample , desiredVolume);
2120+ AIL_set_3D_sample_volume (playing->m_3DSample , getEffectiveVolume (playing->m_audioEventRTS ));
21232121 }
21242122 }
21252123
@@ -2128,9 +2126,8 @@ void MilesAudioManager::adjustVolumeOfPlayingAudio(AsciiString eventName, Real n
21282126 if (playing && playing->m_audioEventRTS ->getEventName () == eventName) {
21292127 // Adjust it
21302128 playing->m_audioEventRTS ->setVolume (newVolume);
2131- Real desiredVolume = playing->m_audioEventRTS ->getVolume () * playing->m_audioEventRTS ->getVolumeShift ();
21322129 AIL_stream_volume_pan (playing->m_stream , NULL , &pan);
2133- AIL_set_stream_volume_pan (playing->m_stream , desiredVolume , pan);
2130+ AIL_set_stream_volume_pan (playing->m_stream , getEffectiveVolume (playing-> m_audioEventRTS ) , pan);
21342131 }
21352132 }
21362133}
0 commit comments