Beispiel #1
0
static void initJuceDevicesIfNeeded()
{
    static AudioDeviceManager sDeviceManager;
    static bool needsInit = true;

    if (! needsInit)
        return;

    needsInit = false;
    new JuceCleanup();

    sDeviceManager.createAudioDeviceTypes(gDeviceTypes);

    // remove JACK from device list
    for (int i=0, count=gDeviceTypes.size(); i < count; ++i)
    {
        if (gDeviceTypes[i]->getTypeName() == "JACK")
        {
            gDeviceTypes.remove(i, true);
            break;
        }
    }
}
Beispiel #2
0
static void initJuceDevicesIfNeeded()
{
    static AudioDeviceManager sDeviceManager;

    if (gDeviceTypes.size() != 0)
        return;

    sDeviceManager.createAudioDeviceTypes(gDeviceTypes);

    CARLA_SAFE_ASSERT_RETURN(gDeviceTypes.size() != 0,);

    new JuceCleanup();

    // remove JACK from device list
    for (int i=0, count=gDeviceTypes.size(); i < count; ++i)
    {
        if (gDeviceTypes[i]->getTypeName() == "JACK")
        {
            gDeviceTypes.remove(i, true);
            break;
        }
    }
}