[Scripting] Error injectNextFrame called with no samples to inject. Returning


Am a bit lost, it looks i do ev erything fine, i peeked in the airship.js for some things.
loading it to cache with.

var openSound = SoundCache.getSound(“url”);

Then playing it with
var injector = Audio.playSound(openSound, { loop: false, position: data.position ,volume: 1.0 });

I get no sound and only this message.
AudioInjector::injectNextFrame() called with no samples to inject. Returning.

already converted the ogg to wav and the wav to 48Khz because the still complained about things. i have also this page open. http://jsref.docs.highfidelity.com/docs/audioplaysound.

Explenation of possible errors would be nice. not sure what it wants and what i do wrong.


I recall seeing the same error recently and it was because my sound file wasn’t 16bit/48k. You should check your sound file is 16bit.
There should be a message in the log, but it’ll after the download success message as it’s where the sound get’s processed.


Thanks @c.
The format where problem. but i forgot to convert it to mono. I now have a mono wav file and that plays. So, the doc page gives the idea you can use stereo wav files (not wanted that) but can the code handle it ?

It now works ! after converting it to mono and use my old positioning


It’s supposed too, you’re also supposed to specify stereo = true in the options you pass to playSound.
But even if you don’t it you still play it at half the speed. Maybe that changed, I haven’t look at that code in a while.


Ok, need to test that other time with stereo and simple script. I moved one soundfile to other place in the code and it refuse to play that one. So more tinkering needed.

Fixt !, stupid user error. Still need to remove extra layer of rust ! :grin: