ASIOAudioIODevice::open does not return error messages


#1

We use tweaked JUCE v1.50. Having a quick look at the tip, this problem will occur on it.

After an error occurred during opening an ASIO device, “error” has a description of the error and close() will be called.

        if (error.isNotEmpty())
        {
            logError (error, err);

            if (asioObject != 0 && buffersCreated)
                asioObject->disposeBuffers();

            Thread::sleep (20);
            isStarted = false;
            isOpen_ = false;
            close();
        }

But in close() “error” is cleared.

    void close()
    {
        error = String::empty;

So we fixed it as below.

    const String open (const BitArray& inputChannels,
                       const BitArray& outputChannels,
                       double sr,
                       int bufferSizeSamples)
    {
#if 1 // prevent other functions from overwriting
        String error;
#endif

    /* many lines... */

#if 1 // store error message
	    this->error = error;
#endif
        return error;
    }

#2

There is a similar problem with wasapi.

Try to disable windows audio devices through windows control panel. audiomanager::initialise will not complain.


#3

Ah! Thanks very much for spotting that one! I’ll sort it out in my next check-in!