X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fvbap.h;h=419930c574a38b83a6998955e0df7d4e121bcd6c;hb=f6ed36a457aace0c4f0c542014d8a3fc65c7a852;hp=b6c2b7a710f86d428740006a7d0cec2f07c580dd;hpb=d8ec9bbea79bc9cefa3e042aae8fd585f35df92b;p=ardour.git diff --git a/libs/ardour/ardour/vbap.h b/libs/ardour/ardour/vbap.h index b6c2b7a710..419930c574 100644 --- a/libs/ardour/ardour/vbap.h +++ b/libs/ardour/ardour/vbap.h @@ -22,50 +22,47 @@ #include #include -#include - #include "ardour/panner.h" +#include "ardour/vbap_speakers.h" namespace ARDOUR { -class VBAPSpeakers; +class Speakers; class VBAPanner : public StreamPanner { - public: - VBAPanner (Panner& parent, Evoral::Parameter param, VBAPSpeakers& s); - ~VBAPanner (); +public: + VBAPanner (Panner& parent, Evoral::Parameter param, Speakers& s); + ~VBAPanner (); + + static StreamPanner* factory (Panner& parent, Evoral::Parameter param, Speakers& s); + static std::string name; - void do_distribute (AudioBuffer&, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes); + void do_distribute (AudioBuffer&, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes); void do_distribute_automated (AudioBuffer& src, BufferSet& obufs, - nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers); + framepos_t start, framepos_t end, pframes_t nframes, pan_t** buffers); - void set_azimuth_elevation (double azimuth, double elevation); + void set_azimuth_elevation (double azimuth, double elevation); XMLNode& state (bool full_state); XMLNode& get_state (); int set_state (const XMLNode&, int version); - /* there never was any old-school automation */ + /* there never was any old-school automation */ int load (std::istream&, std::string path, uint32_t&) { return 0; } - private: - double _azimuth; /* direction for the signal source */ - double _elevation; /* elevation of the signal source */ - bool _dirty; - double gains[3]; - double desired_gains[3]; - int outputs[3]; - int desired_outputs[3]; - - PBD::ScopedConnection speaker_connection; +private: + bool _dirty; + double gains[3]; + double desired_gains[3]; + int outputs[3]; + int desired_outputs[3]; - VBAPSpeakers& _speakers; + VBAPSpeakers& _speakers; - void compute_gains (double g[3], int ls[3], int azi, int ele); + void compute_gains (double g[3], int ls[3], int azi, int ele); - void update (); - void mark_dirty (); + void update (); }; } /* namespace */