+
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
+ ChanCount output_streams() const;
+ ChanCount input_streams() const;
+ bool configure_io (ChanCount in, ChanCount out);
+ bool requires_fixed_size_buffers() const;
+
+ void set_fixed_size_buffers (bool yn) {
+ _requires_fixed_size_buffers = yn;
+ }
+
+ boost::shared_ptr<CAAudioUnit> get_au () { return unit; }
+ boost::shared_ptr<CAComponent> get_comp () const { return comp; }
+
+ OSStatus render_callback(AudioUnitRenderActionFlags *ioActionFlags,
+ const AudioTimeStamp *inTimeStamp,
+ UInt32 inBusNumber,
+ UInt32 inNumberFrames,
+ AudioBufferList* ioData);
+
+ /* "host" callbacks */
+
+ OSStatus get_beat_and_tempo_callback (Float64* outCurrentBeat,
+ Float64* outCurrentTempo);
+
+ OSStatus get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNextBeat,
+ Float32* outTimeSig_Numerator,
+ UInt32* outTimeSig_Denominator,
+ Float64* outCurrentMeasureDownBeat);
+
+ OSStatus get_transport_state_callback (Boolean* outIsPlaying,
+ Boolean* outTransportStateChanged,
+ Float64* outCurrentSampleInTimeLine,
+ Boolean* outIsCycling,
+ Float64* outCycleStartBeat,
+ Float64* outCycleEndBeat);
+
+ static std::string maybe_fix_broken_au_id (const std::string&);
+
+ /* this MUST be called from thread in which you want to receive notifications
+ about parameter changes.
+ */
+ int create_parameter_listener (AUEventListenerProc callback, void *arg, float interval_secs);
+ /* these can be called from any thread but SHOULD be called from the same thread
+ that will receive parameter change notifications.
+ */
+ int listen_to_parameter (uint32_t param_id);
+ int end_listen_to_parameter (uint32_t param_id);
+
+
+ protected:
+ std::string do_save_preset (std::string name);
+ void do_remove_preset (std::string);
+