35 #include <AudioUnit/AudioUnit.h>
36 #include <AudioUnit/AudioUnitProperties.h>
37 #include "AUParamInfo.h"
42 class CAComponentDescription;
43 struct AudioBufferList;
52 AudioUnitParameterID
id;
68 const char *
name ()
const {
return _info->name.c_str(); }
69 const char *
maker ()
const {
return _info->creator.c_str(); }
116 _requires_fixed_size_buffers = yn;
119 std::shared_ptr<CAAudioUnit>
get_au () {
return unit; }
120 std::shared_ptr<CAComponent>
get_comp ()
const {
return comp; }
123 const AudioTimeStamp *inTimeStamp,
125 UInt32 inNumberSamples,
126 AudioBufferList* ioData);
131 Float64* outCurrentTempo);
134 Float32* outTimeSig_Numerator,
135 UInt32* outTimeSig_Denominator,
136 Float64* outCurrentMeasureDownBeat);
139 Boolean* outTransportStateChanged,
140 Float64* outCurrentSampleInTimeLine,
141 Boolean* outIsCycling,
142 Float64* outCycleStartBeat,
143 Float64* outCycleEndBeat);
165 std::shared_ptr<CAComponent>
comp;
166 std::shared_ptr<CAAudioUnit>
unit;
246 std::vector<Plugin::PresetRecord>
get_presets (
bool user_only)
const;
bool needs_midi_input() const
bool is_effect_without_midi_input() const
std::shared_ptr< CAComponentDescription > descriptor
bool reconfigurable_io() const
bool is_instrument() const
std::vector< std::pair< int, int > > io_configs
AUPluginInfo(std::shared_ptr< CAComponentDescription >)
static std::string convert_old_unique_id(std::string const &)
bool is_effect_with_midi_input() const
uint32_t max_configurable_outputs() const
std::vector< Plugin::PresetRecord > get_presets(bool user_only) const
PluginPtr load(Session &session)
const char * label() const
bool parameter_is_control(uint32_t) const
std::string unique_id() const
void set_parameter(uint32_t which, float val, sampleoffset_t)
void parameter_change_listener(void *, void *, const AudioUnitEvent *event, UInt64 host_time, Float32 new_value)
bool _requires_fixed_size_buffers
void set_fixed_size_buffers(bool yn)
void set_info(PluginInfoPtr)
samplepos_t transport_sample
uint32_t configured_input_busses
bool requires_fixed_size_buffers() const
void set_non_realtime(bool)
int connect_and_run(BufferSet &bufs, samplepos_t start, samplepos_t end, double speed, ChanMapping const &in, ChanMapping const &out, pframes_t nframes, samplecnt_t offset)
std::string describe_parameter(Evoral::Parameter)
float default_value(uint32_t port)
static void _parameter_change_listener(void *, void *, const AudioUnitEvent *event, UInt64 host_time, Float32 new_value)
const char * maker() const
samplecnt_t plugin_latency() const
FactoryPresetMap factory_preset_map
std::shared_ptr< CAComponent > comp
std::vector< AUParameterDescriptor > descriptors
PluginOutputConfiguration _output_configs
UserPresetMap user_preset_map
ChanMapping const * input_map
int set_block_size(pframes_t nframes)
std::string do_save_preset(std::string name)
IOPortDescription describe_io_port(DataType dt, bool input, uint32_t id) const
bool parameter_is_input(uint32_t) const
ChanCount output_streams() const
uint32_t configured_output_busses
AUPlugin(const AUPlugin &other)
std::shared_ptr< CAComponent > get_comp() const
void discover_parameters()
BufferSet * input_buffers
OSStatus get_transport_state_callback(Boolean *outIsPlaying, Boolean *outTransportStateChanged, Float64 *outCurrentSampleInTimeLine, Boolean *outIsCycling, Float64 *outCycleStartBeat, Float64 *outCycleEndBeat)
void add_state(XMLNode *) const
bool match_variable_io(ChanCount &in, ChanCount &aux_in, ChanCount &out)
std::vector< std::pair< int, int > > io_configs
bool load_preset(PresetRecord)
void discover_factory_presets()
uint32_t nth_parameter(uint32_t which, bool &ok) const
samplecnt_t _last_nframes
int get_parameter_descriptor(uint32_t which, ParameterDescriptor &) const
void do_remove_preset(std::string)
int set_stream_format(int scope, uint32_t bus, AudioStreamBasicDescription &)
AUPlugin(AudioEngine &engine, Session &session, std::shared_ptr< CAComponent > comp)
int listen_to_parameter(uint32_t param_id)
OSStatus get_musical_time_location_callback(UInt32 *outDeltaSampleOffsetToNextBeat, Float32 *outTimeSig_Numerator, UInt32 *outTimeSig_Denominator, Float64 *outCurrentMeasureDownBeat)
PluginOutputConfiguration possible_output() const
uint32_t parameter_count() const
std::map< std::string, int > FactoryPresetMap
int end_listen_to_parameter(uint32_t param_id)
std::map< uint32_t, uint32_t > ParameterMap
std::vector< std::string > _bus_name_in
bool parameter_is_output(uint32_t) const
bool reconfigure_io(ChanCount in, ChanCount aux_in, ChanCount out)
bool parameter_is_audio(uint32_t) const
std::set< Evoral::Parameter > automatable() const
ParameterMap parameter_map
OSStatus render_callback(AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberSamples, AudioBufferList *ioData)
float last_transport_speed
samplecnt_t samples_processed
int set_state(const XMLNode &node, int)
void * _parameter_listener_arg
std::shared_ptr< CAAudioUnit > get_au()
ChanCount input_streams() const
OSStatus get_beat_and_tempo_callback(Float64 *outCurrentBeat, Float64 *outCurrentTempo)
std::string state_node_name() const
float get_parameter(uint32_t which) const
AUEventListenerRef _parameter_listener
std::map< std::string, std::string > UserPresetMap
std::vector< std::string > _bus_name_out
std::atomic< unsigned int > _current_latency
std::string current_preset() const
std::shared_ptr< CAAudioUnit > unit
AudioBufferList * buffers
const char * name() const
int create_parameter_listener(AUEventListenerProc callback, void *arg, float interval_secs)
GtkImageIconNameData name
void session(lua_State *L)
PBD::PropertyDescriptor< timepos_t > start
std::shared_ptr< Plugin > PluginPtr
Temporal::samplecnt_t samplecnt_t
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t
std::shared_ptr< AUPluginInfo > AUPluginInfoPtr
std::shared_ptr< PluginInfo > PluginInfoPtr
std::set< uint32_t > PluginOutputConfiguration
AudioUnitParameterUnit au_unit