summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-02 02:06:30 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-02 02:06:30 +0000
commit1b0b7849eea034f8809dea31419159724386c2db (patch)
tree4feb6145b3cb88e6dce3b1391c23e8aafb7c2149 /libs
parent04724c21b66fd6e81fd0fbf0ac7cae9c7d9b3b8a (diff)
Remove per-track mono option, as it seems somewhat useless now that we have a mix mono button in the monitor section.
git-svn-id: svn://localhost/ardour2/branches/3.0@8675 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/panner.h9
-rw-r--r--libs/ardour/panner.cc35
2 files changed, 4 insertions, 40 deletions
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h
index b989dca41d..5e0ed991d6 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -83,9 +83,6 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
virtual bool bypassed() const { return _bypassed; }
virtual void set_bypassed (bool yn);
- virtual bool is_mono () const { return _mono; }
- virtual void set_mono (bool);
-
void set_automation_state (AutoState);
AutoState automation_state() const;
void set_automation_style (AutoStyle);
@@ -128,8 +125,7 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
* @param nframes Number of frames in the input.
*
* Derived panners can choose to implement these if they need to gain more control over the panning algorithm.
- * the default is to (1) check if _mono is true, and if so, just deliver .. (2) otherwise, call
- * distribute_one() or distribute_one_automated() on each input buffer to deliver it to each output
+ * the default is to call distribute_one() or distribute_one_automated() on each input buffer to deliver it to each output
* buffer.
*
* If a panner does not need to override this default behaviour, it can just implement
@@ -141,7 +137,7 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
pan_t** buffers);
PBD::Signal0<void> Changed; /* for positional info */
- PBD::Signal0<void> StateChanged; /* for mute, mono */
+ PBD::Signal0<void> StateChanged; /* for mute */
int set_state (const XMLNode&, int version);
virtual XMLNode& state (bool full_state) = 0;
@@ -162,7 +158,6 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
protected:
boost::shared_ptr<Pannable> _pannable;
- bool _mono;
bool _bypassed;
XMLNode& get_state ();
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc
index 1cb5e310aa..c94f668c85 100644
--- a/libs/ardour/panner.cc
+++ b/libs/ardour/panner.cc
@@ -29,7 +29,6 @@ using namespace ARDOUR;
Panner::Panner (boost::shared_ptr<Pannable> p)
: _pannable (p)
- , _mono (0)
{
}
@@ -46,25 +45,12 @@ Panner::set_bypassed (bool yn)
}
}
-void
-Panner::set_mono (bool yn)
-{
- if (yn != _mono) {
- _mono = yn;
- StateChanged ();
- }
-}
-
int
Panner::set_state (const XMLNode& node, int version)
{
const XMLProperty* prop;
XMLNodeConstIterator iter;
- if ((prop = node.property (X_("mono")))) {
- set_mono (string_is_affirmative (prop->value()));
- }
-
if ((prop = node.property (X_("bypassed"))) != 0) {
set_bypassed (string_is_affirmative (prop->value()));
}
@@ -77,7 +63,6 @@ Panner::get_state ()
{
XMLNode* node = new XMLNode (X_("Panner"));
- node->add_property (X_("mono"), (_mono ? "yes" : "no"));
node->add_property (X_("bypassed"), (bypassed() ? "yes" : "no"));
return *node;
@@ -89,15 +74,7 @@ Panner::distribute (BufferSet& ibufs, BufferSet& obufs, gain_t gain_coeff, pfram
uint32_t which = 0;
for (BufferSet::audio_iterator src = ibufs.audio_begin(); src != ibufs.audio_end(); ++src, ++which) {
- if (_mono) {
- /* we're in mono mode, so just pan the input to all outputs equally (XXX should we scale?) */
- for (BufferSet::audio_iterator o = obufs.audio_begin(); o != obufs.audio_end(); ++o) {
- mix_buffers_with_gain ((*o).data(), (*src).data(), nframes, gain_coeff);
- }
- } else {
- /* normal mode, call the `real' distribute method */
- distribute_one (*src, obufs, gain_coeff, nframes, which);
- }
+ distribute_one (*src, obufs, gain_coeff, nframes, which);
}
}
@@ -108,15 +85,7 @@ Panner::distribute_automated (BufferSet& ibufs, BufferSet& obufs,
uint32_t which = 0;
for (BufferSet::audio_iterator src = ibufs.audio_begin(); src != ibufs.audio_end(); ++src, ++which) {
- if (_mono) {
- /* we're in mono mode, so just pan the input to all outputs equally (XXX should we scale?) */
- for (BufferSet::audio_iterator o = obufs.audio_begin(); o != obufs.audio_end(); ++o) {
- mix_buffers_with_gain ((*o).data(), (*src).data(), nframes, 1.0);
- }
- } else {
- /* normal mode, call the `real' distribute method */
- distribute_one_automated (*src, obufs, start, end, nframes, buffers, which);
- }
+ distribute_one_automated (*src, obufs, start, end, nframes, buffers, which);
}
}