AudioScriptingInterface.setStereoInput's return value being removed from the API


The AudioScriptingInterface.setStereoInput function currently returns a boolean to signal whether the call has succeeded.
(You cannot set as a stereo input, an audio device that does not support stereo. And trying to do so will fail)

That function as now been made asynchronous and so it cannot return whether it succeeded or failed immediately. As of RC69 it will always return true even if it fails, and as of RC71, it won’t return anything.

Instead, it has been turned into a Q_PROPERTY and will emit a signal when the value changes.
That means you can now do this:

AudioScriptingInterface.isStereoInputChanged.connect(function(newValue) {
    console.log("The new isStereoInput value is: " + newValue);
var currentValue = AudioScriptingInterface.isStereoInput();

or this:

AudioScriptingInterface.isStereoInputChanged.connect(function(newValue) {
    console.log("The new isStereoInput value is: " + AudioScriptingInterface.isStereoInput);
AudioScriptingInterface.isStereoInput = !AudioScriptingInterface.isStereoInput;

That also means you can use QML bindings with AudioScriptingInterface.isStereoInput

If you have any questions regarding why we made that change, feel free to fire away!


So it will remain on even with a mono source?
Seems good will I still need to enable stereo everyone I play music ?
I play it from a different source than I use for my mic
Would be nice to use 2 sources simultaneously so I can play music and talk


You say that high fidelity still not have music stream support ? Because you not stream music from avatar, that’s bad. besides i tried it long ago and it worked very bad.


I warmed to if cos it’s much better sounding the usual shout cast muffled mp3. But it required me getting a lot of gear to work as I want to use it
I still want iTunes or whatever to show up in the audio devices to make it easy for everyone


In other words. you need a “speaker” avatar that you use fopr the music. And then your normal avatar for the fun. :crazy_face: That’s making things extra complex.


No, mono sources cannot stream in stereo (at least on windows, it is implementation dependent).

To be clear, the current behavior of the product regarding audio and stereo should not change in any way.
This is only a change in the way those functions are called/used from JS/QML to accomplish what you want to do.
The stereo behavior is still the same.


When you say mono are you talking same from both left and right speaker or through just the one channel?
oh god semantics


I mean 1 channel. :slight_smile:
If you were to feed the same audio through 2 different channels that would technically be a stereo audio stream, though it would sound the same as a mono stream.

Basically, on Windows, if your input device does not have 2 channels, we won’t let you enable stereo (there’s no point really, it only has one channel).
I believe on mac, it will let you do it, but it’ll duplicate the channel into two. So it doesn’t really do anything either except take twice the bandwidth and make the mixer work harder.


I knew if i made a comment about stereo i would be panned


this is a great addition for log-checking. i used to get so confused about my mono vs stereo settings!