Skip to content

Commit f075047

Browse files
committed
Update Panning and Volume in settings examples
1 parent ce35398 commit f075047

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ fn play_audio(asset_server: Res<AssetServer>, audio: Res<Audio>) {
5050
// Fade-in with a dynamic easing
5151
.fade_in(AudioTween::new(Duration::from_secs(2), AudioEasing::OutPowi(2)))
5252
// Only play on our right ear
53-
.with_panning(kira::Panning(1.0))
53+
.with_panning(1.0)
5454
// Increase playback rate by 50% (this also increases the pitch)
5555
.with_playback_rate(1.5)
56-
// Play at half volume
57-
.with_volume(0.5)
56+
// Play at lower volume (-10dB)
57+
.with_volume(-10.)
5858
// play the track reversed
5959
.reverse();
6060
}

examples/settings.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use bevy::prelude::*;
22
use bevy_kira_audio::prelude::*;
3-
use kira::Panning;
43
use std::time::Duration;
54

65
/// This example shows the different settings that can be applied when playing a sound.
@@ -26,11 +25,11 @@ fn play_audio(asset_server: Res<AssetServer>, audio: Res<Audio>) {
2625
AudioEasing::OutPowi(2),
2726
))
2827
// Only play on our right ear
29-
.with_panning(Panning(1.0))
28+
.with_panning(1.0)
3029
// Increase playback rate by 50% (this also increases the pitch)
3130
.with_playback_rate(1.5)
32-
// Play at half volume
33-
.with_volume(0.5)
31+
// Play at lower volume (-10dB)
32+
.with_volume(-10.)
3433
// play the track reversed
3534
.reverse();
3635
}

0 commit comments

Comments
 (0)