Replies: 2 comments 2 replies
-
Actually I've removed former modulator for volume by simple call to For the emitters now I construct them this way: pub struct Spatial(SpatialTrackHandle);
impl Spatial {
pub fn try_new<B: Backend>(
manager: &mut AudioManager<B>,
listener: impl Into<ListenerId>,
position: impl Into<Value<mint::Vector3<f32>>>,
settings: SpatialTrackSettings,
ambience: &Ambience,
) -> Result<Self, Error> {
let SpatialTrackSettings {
distances,
persist_until_sounds_finish,
attenuation_function,
spatialization_strength,
affected_by_reverb_mix,
affected_by_environmental_preset,
} = settings;
let mut builder = SpatialTrackBuilder::new()
.distances(distances)
.spatialization_strength(spatialization_strength)
.persist_until_sounds_finish(persist_until_sounds_finish)
.attenuation_function(attenuation_function);
if affected_by_reverb_mix {
builder = builder.with_send(ambience.reverb(), amplitude!(0.15).as_decibels());
}
if affected_by_environmental_preset {
builder = builder.with_send(ambience.environmental(), amplitude!(0.5).as_decibels());
}
let track = manager.add_spatial_sub_track(listener, position, builder)?;
Ok(Self(track))
}
} But it seems the volume does not get softer when further away, or louder when closer on Is this a bug or a simple misuse of kira on my side ? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Also closing this question since everything was easily refactored once I looked a bit more in the docs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, spatialization seems to have changed a bit recently, what's the recommended approach to adjust volume from 2 different sources:
Value::FromListenerDistance
(set on a per-emitter basis) +Value::from_modulator
(global volume player can set in settings) ?Beta Was this translation helpful? Give feedback.
All reactions