diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-26 17:43:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-26 17:43:03 +0000 |
commit | 553cf2982c4905c5a08f305ce2772beaa8c50324 (patch) | |
tree | d23a7bad787a2d5bc1a909a14e9869fcfb405ae8 /libs/ardour/vbap.cc | |
parent | 1539ac1b9661f0c0bb313d8f0d9a72b6dc95aaf1 (diff) |
one step closer to working vbap panning
git-svn-id: svn://localhost/ardour2/branches/3.0@8091 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/vbap.cc')
-rw-r--r-- | libs/ardour/vbap.cc | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/libs/ardour/vbap.cc b/libs/ardour/vbap.cc index bb5bed4963..31a8e6c134 100644 --- a/libs/ardour/vbap.cc +++ b/libs/ardour/vbap.cc @@ -41,6 +41,7 @@ #include "pbd/cartesian.h" +#include "ardour/speakers.h" #include "ardour/vbap.h" #include "ardour/vbap_speakers.h" #include "ardour/audio_buffer.h" @@ -50,13 +51,13 @@ using namespace PBD; using namespace ARDOUR; using namespace std; -VBAPanner::VBAPanner (Panner& parent, Evoral::Parameter param, VBAPSpeakers& s) +string VBAPanner::name = X_("VBAP"); + +VBAPanner::VBAPanner (Panner& parent, Evoral::Parameter param, Speakers& s) : StreamPanner (parent, param) , _dirty (false) - , _speakers (s) - + , _speakers (VBAPSpeakers::instance (s)) { - _speakers.Changed.connect_same_thread (speaker_connection, boost::bind (&VBAPanner::mark_dirty, this)); } VBAPanner::~VBAPanner () @@ -72,16 +73,11 @@ VBAPanner::mark_dirty () void VBAPanner::update () { - /* convert from coordinate space with (0,0) at upper left to (0,0) at center and dimensions of 1 unit */ - _x -= 0.5; - _y -= 0.5; - - - /* we're 2D for now */ - _z = 0.0; - - cart_to_azi_ele (_x, _y, _z, _azimuth, _elevation); + /* force 2D for now */ + _angles.ele = 0.0; _dirty = true; + + Changed (); } void @@ -234,3 +230,10 @@ VBAPanner::set_state (const XMLNode& node, int /*version*/) { return 0; } + +StreamPanner* +VBAPanner::factory (Panner& parent, Evoral::Parameter param, Speakers& s) +{ + return new VBAPanner (parent, param, s); +} + |