Пример #1
0
void AudioDeviceManager::addMidiInputCallback (const String& name, MidiInputCallback* callbackToAdd)
{
    removeMidiInputCallback (name, callbackToAdd);

    if (name.isEmpty() || isMidiInputEnabled (name))
    {
        const ScopedLock sl (midiCallbackLock);
        midiCallbacks.add (callbackToAdd);
        midiCallbackDevices.add (name);
    }
}
Пример #2
0
void AudioDeviceManager::addMidiInputCallback (const String& name, MidiInputCallback* callbackToAdd)
{
    removeMidiInputCallback (name, callbackToAdd);

    if (name.isEmpty() || isMidiInputEnabled (name))
    {
        const ScopedLock sl (midiCallbackLock);

        MidiCallbackInfo mc;
        mc.deviceName = name;
        mc.callback = callbackToAdd;
        midiCallbacks.add (mc);
    }
}
void AudioFilterStreamingDeviceManager::setFilter (AudioProcessor* filterToStream)
{
    if (streamer != 0)
    {
        removeMidiInputCallback (String::empty, streamer);
        removeAudioCallback (streamer);

        delete streamer;
        streamer = 0;
    }

    if (filterToStream != 0)
    {
        streamer = new AudioFilterStreamer (*filterToStream);

        addAudioCallback (streamer);
        addMidiInputCallback (String::empty, streamer);
    }
}