22 #ifdef HAVE_LV2_1_18_6
23 #include <lv2/atom/atom.h>
24 #include <lv2/atom/forge.h>
26 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
27 #include <lv2/lv2plug.in/ns/ext/atom/forge.h>
31 #include <CoreServices/CoreServices.h>
32 #include <CoreAudio/CoreAudio.h>
33 #include <AudioUnit/AudioUnit.h>
47 class SurroundPannable;
67 return _current_n_channels;
71 return _total_n_channels - (with_beds ? 0 : 10);
75 return _surround_processor;
79 return _have_au_renderer;
86 return _binaural_render_control;
90 OUTPUT_FORMAT_5_1 = 2,
91 OUTPUT_FORMAT_7_1_4 = 6
95 return _current_output_format;
99 return _output_format_control;
122 static const size_t max_object_id = 128;
123 static const size_t num_pan_parameters = 8;
125 void forge_int_msg (uint32_t obj_id, uint32_t key,
int val, uint32_t key2 = 0,
int val2 = 0);
158 AudioBufferList* _au_buffers;
163 AudioUnitParameterID id;
164 AudioUnitScope scope;
165 AudioUnitElement element;
167 float lower, upper, normal;
170 std::vector<AUParameter> _au_params;
171 std::vector<AUPreset> _au_presets;
173 static OSStatus _render_callback(
void*, AudioUnitRenderActionFlags*,
const AudioTimeStamp*, UInt32, UInt32, AudioBufferList*);
174 OSStatus render_callback(AudioUnitRenderActionFlags*,
const AudioTimeStamp*, UInt32, UInt32, AudioBufferList*);
179 uint8_t _atom_buf[8192];
180 pan_t _current_value[max_object_id][num_pan_parameters];
181 int _current_render_mode[max_object_id];
182 size_t _channel_id_map[max_object_id];
BinauralRenderControl(bool v, std::string const &n, PBD::Controllable::Flag f)
virtual std::string get_user_string() const
SurroundReturn(Session &, Route *)
int set_block_size(pframes_t)
int set_state(XMLNode const &, int version)
std::shared_ptr< PBD::Controllable > binaural_render_controllable() const
void forge_int_msg(uint32_t obj_id, uint32_t key, int val, uint32_t key2=0, int val2=0)
MainOutputFormat _current_output_format
size_t total_n_channels(bool with_beds=true) const
void maybe_send_metadata(size_t id, pframes_t frame, pan_t const v[num_pan_parameters], bool force=false)
virtual ~SurroundReturn()
void set_with_all_metadata(bool)
void set_sync_and_align(bool on)
std::shared_ptr< OutputFormatControl > _output_format_control
std::string _export_reference
std::shared_ptr< LV2Plugin > _surround_processor
void run(BufferSet &bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool)
std::shared_ptr< PBD::Controllable > output_format_controllable() const
size_t n_channels() const
samplecnt_t signal_latency() const
bool can_support_io_configuration(const ChanCount &in, ChanCount &out)
bool have_au_renderer() const
bool set_au_param(size_t, float)
std::shared_ptr< Amp > _trim
bool load_au_preset(size_t)
std::shared_ptr< BinauralRenderControl > _binaural_render_control
std::atomic< int > _flush
std::shared_ptr< LV2Plugin > surround_processor() const
void setup_export(std::string const &, samplepos_t, samplepos_t)
void set_bed_mix(bool on, std::string const &ref, int *cmap=NULL)
size_t _current_n_channels
MainOutputFormat output_format() const
void set_playback_offset(samplecnt_t cnt)
samplepos_t _export_start
bool display_to_user() const
float integrated_loudness() const
float max_momentary() const
void evaluate(size_t id, std::shared_ptr< SurroundPannable > const &, timepos_t const &, pframes_t, bool force=false)
Temporal::samplecnt_t samplecnt_t
Temporal::samplepos_t samplepos_t