12#ifndef __AUDACITY_AUDIO_UNIT_INSTANCE__
13#define __AUDACITY_AUDIO_UNIT_INSTANCE__
23 using Instance::mProcessor;
26 AudioComponent component,
Parameters ¶meters,
27 const wxString &identifier,
28 unsigned audioIns,
unsigned audioOuts,
bool useLatency);
31 AudioUnitParameterValue inParameterValue);
34 std::unique_ptr<Message>
MakeMessage()
const override;
37 std::unique_ptr<Message>
38 MakeMessage(AudioUnitParameterID
id, AudioUnitParameterValue value)
const;
55 const float *
const *inBlock,
float *
const *outBlock,
size_t blockLen)
61 unsigned numChannels,
float sampleRate)
override;
69 const float *
const *inbuf,
float *
const *outbuf,
size_t numSamples)
74 AudioUnitRenderActionFlags *inActionFlags,
75 const AudioTimeStamp *inTimeStamp,
76 UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData);
77 OSStatus
Render(AudioUnitRenderActionFlags *inActionFlags,
78 const AudioTimeStamp *inTimeStamp,
79 UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData);
86 std::vector<std::unique_ptr<AudioUnitInstance>>
mSlaves;
std::unique_ptr< T, AudioUnitCleaner< T, fn > > AudioUnitCleanup
RAII for cleaning up AU plugin state.
static Settings & settings()
std::vector< std::unique_ptr< AudioUnitInstance > > mSlaves
bool mRecruited
Whether the master instance is now allocated to a group number.
size_t SetBlockSize(size_t maxBlockSize) override
PackedArray::Ptr< AudioBufferList > mInputList
AudioUnitCleanup< AudioUnit, AudioUnitUninitialize > mInitialization
size_t RealtimeProcess(size_t group, EffectSettings &settings, const float *const *inbuf, float *const *outbuf, size_t numSamples) override
bool RealtimeInitialize(EffectSettings &settings, double sampleRate) override
bool RealtimeSuspend() override
bool RealtimeFinalize(EffectSettings &settings) noexcept override
bool RealtimeResume() override
std::unique_ptr< Message > MakeMessage() const override
Called on the main thread, in which the result may be cloned.
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
bool RealtimeProcessEnd(EffectSettings &settings) noexcept override
settings can be updated to let a dialog change appearance at idle
AudioTimeStamp mTimeStamp
bool UsesMessages() const noexcept override
OSStatus Render(AudioUnitRenderActionFlags *inActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData)
const wxString & mIdentifier
void EventListener(const AudioUnitEvent *inEvent, AudioUnitParameterValue inParameterValue)
bool ProcessFinalize() noexcept override
bool BypassEffect(bool bypass)
bool RealtimeAddProcessor(EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate) override
PackedArray::Ptr< AudioBufferList > mOutputList
bool RealtimeProcessStart(MessagePackage &package) override
settings are possibly changed, since last call, by an asynchronous dialog
AudioUnitInstance(const PerTrackEffect &effect, AudioComponent component, Parameters ¶meters, const wxString &identifier, unsigned audioIns, unsigned audioOuts, bool useLatency)
size_t InitialBlockSize() const
SampleCount GetLatency(const EffectSettings &settings, double sampleRate) const override
static OSStatus RenderCallback(void *inRefCon, AudioUnitRenderActionFlags *inActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData)
size_t GetBlockSize() const override
size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
Called for destructive effect computation.
unsigned GetAudioOutCount() const override
How many output buffers to allocate at once.
unsigned GetAudioInCount() const override
How many input buffers to allocate at once.
Hold values to send to effect output meters.
Base class for many of the effects in Audacity.
constexpr auto sampleRate
constexpr auto maxBlockSize
Manages and interacts with an AudioUnit, providing operations on audio effects.
Externalized state of a plug-in.