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();
AudioScriptingInterface.setStereoInput(!currentValue);
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!