diff --git a/assets/voxygen/audio/ambient.ron b/assets/voxygen/audio/ambient.ron index a1fb6a9d48..b4a619df07 100644 --- a/assets/voxygen/audio/ambient.ron +++ b/assets/voxygen/audio/ambient.ron @@ -2,22 +2,22 @@ tracks: [ ( path: "voxygen.audio.ambience.wind", - length: 14.203, + length: 14.17, tag: Wind, ), ( path: "voxygen.audio.ambience.rain", - length: 17.0, + length: 16.97, tag: Rain, ), ( path:"voxygen.audio.ambience.thunder", - length: 32.0, + length: 31.97, tag: Thunder, ), ( path:"voxygen.audio.ambience.leaves", - length: 26.0, + length: 25.97, tag: Leaves, ), ] diff --git a/assets/voxygen/audio/soundtrack.ron b/assets/voxygen/audio/soundtrack.ron index 6a0958c4af..0bdc506e1f 100644 --- a/assets/voxygen/audio/soundtrack.ron +++ b/assets/voxygen/audio/soundtrack.ron @@ -641,8 +641,8 @@ biomes: [], site: Some(Dungeon), segments: [ - ("voxygen.audio.soundtrack.combat.barred_paths.barred_paths-start", 56.0, Transition(Explore, Combat(High)), Some(Combat(High))), - ("voxygen.audio.soundtrack.combat.barred_paths.barred_paths-loop", 54.0, Activity(Combat(High)), None), + ("voxygen.audio.soundtrack.combat.barred_paths.barred_paths-start", 55.97, Transition(Explore, Combat(High)), Some(Combat(High))), + ("voxygen.audio.soundtrack.combat.barred_paths.barred_paths-loop", 53.97, Activity(Combat(High)), None), ("voxygen.audio.soundtrack.combat.barred_paths.barred_paths-end", 6.0, Transition(Combat(High), Explore), None), ], ), @@ -653,8 +653,8 @@ biomes: [], site: Some(Dungeon), segments: [ - ("voxygen.audio.soundtrack.combat.reversal.reversal-start", 60.0, Transition(Explore, Combat(High)), Some(Combat(High))), - ("voxygen.audio.soundtrack.combat.reversal.reversal-loop", 60.0, Activity(Combat(High)), None), + ("voxygen.audio.soundtrack.combat.reversal.reversal-start", 59.97, Transition(Explore, Combat(High)), Some(Combat(High))), + ("voxygen.audio.soundtrack.combat.reversal.reversal-loop", 59.97, Activity(Combat(High)), None), ("voxygen.audio.soundtrack.combat.reversal.reversal-end", 4.0, Transition(Combat(High), Explore), None), ], ), diff --git a/voxygen/src/audio/ambient.rs b/voxygen/src/audio/ambient.rs index 8382a43be7..21f6db1fb7 100644 --- a/voxygen/src/audio/ambient.rs +++ b/voxygen/src/audio/ambient.rs @@ -79,20 +79,17 @@ impl AmbientMgr { // Update with sfx volume channel.set_volume(ambience_volume); - // Set the duration of the loop to whatever the current value is (0.0 by - // default) - // If the sound should loop at this point: if channel.began_playing.elapsed().as_secs_f32() > channel.next_track_change { let track = ambience.tracks.iter().find(|track| track.tag == tag); - // Set the channel's start point at this instant + // Set the channel's start point to this instant channel.began_playing = Instant::now(); if let Some(track) = track { // Set loop duration to the one specified in the ron channel.next_track_change = track.length; // Play the file of the current tag at the current multiplier; let current_multiplier = channel.multiplier; - audio.play_ambient(tag, &track.path, current_multiplier); + audio.play_ambient(tag, &track.path, current_multiplier * ambience_volume); } }; diff --git a/voxygen/src/audio/mod.rs b/voxygen/src/audio/mod.rs index 482b8d0d20..bd0db0b614 100644 --- a/voxygen/src/audio/mod.rs +++ b/voxygen/src/audio/mod.rs @@ -308,15 +308,10 @@ impl AudioFrontend { } /// Plays a file at a given volume in the channel with a given tag - fn play_ambient( - &mut self, - channel_tag: AmbientChannelTag, - sound: &str, - volume_multiplier: f32, - ) { + fn play_ambient(&mut self, channel_tag: AmbientChannelTag, sound: &str, volume: f32) { if self.audio_stream.is_some() { if let Some(channel) = self.get_ambient_channel(channel_tag) { - channel.set_volume(volume_multiplier); + channel.set_volume(volume); channel.play(load_ogg(sound)); } }