diff options
author | John Anderson <ardour@semiosix.com> | 2007-08-09 16:50:07 +0000 |
---|---|---|
committer | John Anderson <ardour@semiosix.com> | 2007-08-09 16:50:07 +0000 |
commit | f914f67036098edd5f1f5b942fb11b9632d3f36a (patch) | |
tree | 9c94d700355a789b2c337e96fdc39cde63d1076a /libs/surfaces | |
parent | 752b4b18ceb73ecf0cc43d76de0b26bd134b2108 (diff) |
even more debug output, aimed at finding the mysterious fader bug
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2281 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/mackie/SConscript | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/controls.cc | 24 | ||||
-rw-r--r-- | libs/surfaces/mackie/controls.h | 18 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 15 | ||||
-rw-r--r-- | libs/surfaces/mackie/route_signal.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 6 |
6 files changed, 62 insertions, 9 deletions
diff --git a/libs/surfaces/mackie/SConscript b/libs/surfaces/mackie/SConscript index ead34f23cc..bc834a9550 100644 --- a/libs/surfaces/mackie/SConscript +++ b/libs/surfaces/mackie/SConscript @@ -22,7 +22,7 @@ mackie.Append(POTFILE = domain + '.pot') if mackie['DEBUG'] == 1: mackie.Append(CXXFLAGS="-DDEBUG") - #mackie.Append(CXXFLAGS="-DPORT_DEBUG") + mackie.Append(CXXFLAGS="-DPORT_DEBUG") mackie_files=Split(""" interface.cc diff --git a/libs/surfaces/mackie/controls.cc b/libs/surfaces/mackie/controls.cc index 5c2d1e6779..8ce513aa49 100644 --- a/libs/surfaces/mackie/controls.cc +++ b/libs/surfaces/mackie/controls.cc @@ -147,3 +147,27 @@ ostream & Mackie::operator << ( ostream & os, const Mackie::Control & control ) return os; } + +std::ostream & Mackie::operator << ( std::ostream & os, const Strip & strip ) +{ + os << typeid( strip ).name(); + os << " { "; + os << "has_solo: " << boolalpha << strip.has_solo(); + os << ", "; + os << "has_recenable: " << boolalpha << strip.has_recenable(); + os << ", "; + os << "has_mute: " << boolalpha << strip.has_mute(); + os << ", "; + os << "has_select: " << boolalpha << strip.has_select(); + os << ", "; + os << "has_vselect: " << boolalpha << strip.has_vselect(); + os << ", "; + os << "has_fader_touch: " << boolalpha << strip.has_fader_touch(); + os << ", "; + os << "has_vpot: " << boolalpha << strip.has_vpot(); + os << ", "; + os << "has_gain: " << boolalpha << strip.has_gain(); + os << " }"; + + return os; +} diff --git a/libs/surfaces/mackie/controls.h b/libs/surfaces/mackie/controls.h index a6c45e7eef..bcf869f12f 100644 --- a/libs/surfaces/mackie/controls.h +++ b/libs/surfaces/mackie/controls.h @@ -113,14 +113,14 @@ public: Pot & vpot(); Fader & gain(); - bool has_solo() { return _solo != 0; } - bool has_recenable() { return _recenable != 0; } - bool has_mute() { return _mute != 0; } - bool has_select() { return _select != 0; } - bool has_vselect() { return _vselect != 0; } - bool has_fader_touch() { return _fader_touch != 0; } - bool has_vpot() { return _vpot != 0; } - bool has_gain() { return _gain != 0; } + bool has_solo() const { return _solo != 0; } + bool has_recenable() const { return _recenable != 0; } + bool has_mute() const { return _mute != 0; } + bool has_select() const { return _select != 0; } + bool has_vselect() const { return _vselect != 0; } + bool has_fader_touch() const { return _fader_touch != 0; } + bool has_vpot() const { return _vpot != 0; } + bool has_gain() const { return _gain != 0; } private: Button * _solo; @@ -134,6 +134,8 @@ private: int _index; }; +std::ostream & operator << ( std::ostream &, const Strip & ); + class MasterStrip : public Strip { public: diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 790eef7ee9..f87b6b10ed 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -939,6 +939,9 @@ void MackieControlProtocol::notify_solo_changed( RouteSignal * route_signal ) try { Button & button = route_signal->strip().solo(); +#ifdef DEBUG + cout << "updating " << button << endl; +#endif route_signal->port().write( builder.build_led( button, route_signal->route().soloed() ) ); } catch( exception & e ) @@ -952,6 +955,9 @@ void MackieControlProtocol::notify_mute_changed( RouteSignal * route_signal ) try { Button & button = route_signal->strip().mute(); +#ifdef DEBUG + cout << "updating " << button << endl; +#endif route_signal->port().write( builder.build_led( button, route_signal->route().muted() ) ); } catch( exception & e ) @@ -965,6 +971,9 @@ void MackieControlProtocol::notify_record_enable_changed( RouteSignal * route_si try { Button & button = route_signal->strip().recenable(); +#ifdef DEBUG + cout << "updating " << button << endl; +#endif route_signal->port().write( builder.build_led( button, route_signal->route().record_enabled() ) ); } catch( exception & e ) @@ -978,6 +987,9 @@ void MackieControlProtocol::notify_gain_changed( RouteSignal * route_signal ) try { Fader & fader = route_signal->strip().gain(); +#ifdef DEBUG + cout << "updating " << fader << endl; +#endif if ( !fader.in_use() ) { route_signal->port().write( builder.build_fader( fader, gain_to_slider_position( route_signal->route().effective_gain() ) ) ); @@ -1024,6 +1036,9 @@ void MackieControlProtocol::notify_panner_changed( RouteSignal * route_signal ) try { Pot & pot = route_signal->strip().vpot(); +#ifdef DEBUG + cout << "updating " << pot << endl; +#endif const Panner & panner = route_signal->route().panner(); if ( panner.size() == 1 || ( panner.size() == 2 && panner.linked() ) ) { diff --git a/libs/surfaces/mackie/route_signal.cc b/libs/surfaces/mackie/route_signal.cc index 92e3956b07..b3922770a0 100644 --- a/libs/surfaces/mackie/route_signal.cc +++ b/libs/surfaces/mackie/route_signal.cc @@ -79,6 +79,9 @@ void RouteSignal::disconnect() void RouteSignal::notify_all() { +#ifdef DEBUG + cout << "RouteSignal::notify_all for " << _strip << endl; +#endif if ( _strip.has_solo() ) _mcp.notify_solo_changed( this ); @@ -95,4 +98,7 @@ void RouteSignal::notify_all() if ( _strip.has_recenable() ) _mcp.notify_record_enable_changed( this ); +#ifdef DEBUG + cout << "RouteSignal::notify_all finish" << endl; +#endif } diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index 7c77e86285..ce0d9848df 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -14,8 +14,14 @@ Surface::Surface( uint32_t max_strips, uint32_t unit_strips ) void Surface::init() { +#ifdef DEBUG + cout << "Surface::init" << endl; +#endif init_controls(); init_strips( _max_strips, _unit_strips ); +#ifdef DEBUG + cout << "Surface::init finish" << endl; +#endif } Surface::~Surface() |