| 472 | } |
| 473 | |
| 474 | OSStatus auInitialize() |
| 475 | { |
| 476 | #if defined(DISTRHO_PLUGIN_EXTRA_IO) && DISTRHO_PLUGIN_NUM_INPUTS != 0 && DISTRHO_PLUGIN_NUM_OUTPUTS != 0 |
| 477 | if (! isNumChannelsComboValid(fNumInputs, fNumOutputs)) |
| 478 | return kAudioUnitErr_FormatNotSupported; |
| 479 | #endif |
| 480 | |
| 481 | #if DISTRHO_PLUGIN_NUM_INPUTS + DISTRHO_PLUGIN_NUM_OUTPUTS != 0 |
| 482 | if (! reallocAudioBufferList(true)) |
| 483 | return kAudio_ParamError; |
| 484 | #endif |
| 485 | |
| 486 | #if DISTRHO_PLUGIN_WANT_MIDI_INPUT |
| 487 | fMidiEventCount = 0; |
| 488 | #endif |
| 489 | #if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT |
| 490 | fMidiOutputDataOffset = 0; |
| 491 | fMidiOutputPackets->numPackets = 0; |
| 492 | #endif |
| 493 | #if DISTRHO_PLUGIN_WANT_TIMEPOS |
| 494 | fTimePosition.clear(); |
| 495 | fTimePosition.bbt.ticksPerBeat = kDefaultTicksPerBeat; |
| 496 | #endif |
| 497 | |
| 498 | fPlugin.activate(); |
| 499 | return noErr; |
| 500 | } |
| 501 | |
| 502 | OSStatus auUninitialize() |
| 503 | { |
nothing calls this directly
no test coverage detected