+ /* despite all the cool work that apple did on their AU preset
+ system, they left factory presets and user presets as two
+ entirely different kinds of things, handled by two entirely
+ different parts of the API. Resolve this.
+ */
+
+ /* XXX these two maps should really be shared across all instances of this AUPlugin */
+
+ typedef std::map<std::string,std::string> UserPresetMap;
+ UserPresetMap user_preset_map;
+ typedef std::map<std::string,int> FactoryPresetMap;
+ FactoryPresetMap factory_preset_map;
+
+ UInt32 global_elements;
+ UInt32 output_elements;
+ UInt32 input_elements;
+
+ bool variable_inputs;
+ bool variable_outputs;
+
+ uint32_t configured_input_busses;
+ uint32_t configured_output_busses;
+
+ uint32_t *bus_inputs;
+ uint32_t *bus_outputs;
+ std::vector <std::string> _bus_name_in;
+ std::vector <std::string> _bus_name_out;
+
+ int set_stream_format (int scope, uint32_t bus, AudioStreamBasicDescription&);
+ void discover_parameters ();
+ void add_state (XMLNode *) const;
+
+ typedef std::map<uint32_t, uint32_t> ParameterMap;
+ ParameterMap parameter_map;
+ uint32_t input_maxbuf;
+ framecnt_t input_offset;
+ framecnt_t *cb_offsets;
+ BufferSet* input_buffers;
+ ChanMapping * input_map;
+ framecnt_t frames_processed;
+ uint32_t audio_input_cnt;
+
+ std::vector<AUParameterDescriptor> descriptors;
+ AUEventListenerRef _parameter_listener;
+ void * _parameter_listener_arg;
+ void init ();
+
+ void discover_factory_presets ();
+
+ bool last_transport_rolling;
+ float last_transport_speed;
+
+ static void _parameter_change_listener (void* /*arg*/, void* /*src*/, const AudioUnitEvent* event, UInt64 host_time, Float32 new_value);
+ void parameter_change_listener (void* /*arg*/, void* /*src*/, const AudioUnitEvent* event, UInt64 host_time, Float32 new_value);