Closed johnsmith1243 closed 4 years ago
Same problem here with stereo()
It seems that stereo
takes time to be activated as if a panning nob were turned slowly.
Even using a event listener.
const self = this;
this.sounds[name].stereo(stereo).once('stereo', function() {
self.sounds[name].play();
});
Do you have a test case showing this happening? I'm not seeing this behavior in the tests (https://howlerjs.com/#basic) or in our games.
Closing due to inactivity. If this is still an issue, reply with more info and I'll reopen.
I recently had this problem again and figured out a workaround. If you place .pos inside of a function it is delayed half a second the first time the sound is played. If you place .pos outside of the function it works fine, and then you can change the position further without delay. The delay seems to only occur if you try to determine the .pos at the same time as playing the sound. This is what worked for me:
var sound = new Howl({
src: ['sound.ogg'],
loop: true,
volume: 1
});
{sound.pos(1, 0, 1);}
function playsound() {
sound.play();
}
I am trying to set the position of an audio file ("wind"). When I activate the audio files, the audio files plays for a half a second without any set position, and then suddenly changes to the position I have set (1, 0, 1) after half a second. Is there a way to fix this?