summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2006-07-19 16:47:04 +0000
committerTaybin Rutkin <taybin@taybin.com>2006-07-19 16:47:04 +0000
commit433d9a5fc3538aa170d3ad1cb11929c0e5e94567 (patch)
treece4cb929e91bb94ef0d410f2824ca1623440d696
parent50a4504e488227182374b39c7ea50a1147f3557d (diff)
Removed unused midicontrollable.cc
Enum and namespace syntax fixes to satisfy -pedantic Resolved a couple "code never reached" areas to satisfy -Wextra git-svn-id: svn://localhost/ardour2/trunk@688 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour_dialog.h3
-rw-r--r--gtk2_ardour/ardour_ui.h8
-rw-r--r--gtk2_ardour/audio_clock.h6
-rw-r--r--libs/ardour/ardour/ardour.h2
-rw-r--r--libs/ardour/ardour/audio_diskstream.h2
-rw-r--r--libs/ardour/ardour/audio_track.h2
-rw-r--r--libs/ardour/ardour/audioengine.h2
-rw-r--r--libs/ardour/ardour/audiofilesource.h2
-rw-r--r--libs/ardour/ardour/audioregion.h3
-rw-r--r--libs/ardour/ardour/configuration.h2
-rw-r--r--libs/ardour/ardour/curve.h2
-rw-r--r--libs/ardour/ardour/export.h2
-rw-r--r--libs/ardour/ardour/insert.h2
-rw-r--r--libs/ardour/ardour/io.h2
-rw-r--r--libs/ardour/ardour/location.h2
-rw-r--r--libs/ardour/ardour/logcurve.h2
-rw-r--r--libs/ardour/ardour/panner.h2
-rw-r--r--libs/ardour/ardour/port.h2
-rw-r--r--libs/ardour/ardour/redirect.h2
-rw-r--r--libs/ardour/ardour/route.h4
-rw-r--r--libs/ardour/ardour/route_group.h2
-rw-r--r--libs/ardour/ardour/send.h2
-rw-r--r--libs/ardour/ardour/session.h6
-rw-r--r--libs/ardour/ardour/sndfilesource.h2
-rw-r--r--libs/ardour/ardour/types.h6
-rw-r--r--libs/ardour/panner.cc2
-rw-r--r--libs/ardour/session_state.cc2
-rw-r--r--libs/midi++2/SConscript1
-rw-r--r--libs/midi++2/midi++/channel.h2
-rw-r--r--libs/midi++2/midi++/controllable.h92
-rw-r--r--libs/midi++2/midi++/coremidi_midiport.h2
-rw-r--r--libs/midi++2/midi++/factory.h2
-rw-r--r--libs/midi++2/midi++/fd_midiport.h2
-rw-r--r--libs/midi++2/midi++/fifomidi.h2
-rw-r--r--libs/midi++2/midi++/manager.h2
-rw-r--r--libs/midi++2/midi++/mmc.h4
-rw-r--r--libs/midi++2/midi++/nullmidi.h2
-rw-r--r--libs/midi++2/midi++/parser.h2
-rw-r--r--libs/midi++2/midi++/port.h5
-rw-r--r--libs/midi++2/midi++/port_request.h2
-rw-r--r--libs/midi++2/midi++/types.h4
-rw-r--r--libs/midi++2/midicontrollable.cc326
-rw-r--r--libs/midi++2/midiparser.cc2
-rw-r--r--libs/pbd/pbd/basename.h2
-rw-r--r--libs/pbd/pool.cc2
-rw-r--r--libs/soundtouch/STTypes.h2
46 files changed, 57 insertions, 477 deletions
diff --git a/gtk2_ardour/ardour_dialog.h b/gtk2_ardour/ardour_dialog.h
index a23dcda9e0..069768c143 100644
--- a/gtk2_ardour/ardour_dialog.h
+++ b/gtk2_ardour/ardour_dialog.h
@@ -26,7 +26,7 @@
namespace ARDOUR {
class Session;
-};
+}
/*
* This virtual parent class is so that each dialog box uses the
@@ -55,3 +55,4 @@ class ArdourDialog : public Gtk::Dialog
};
#endif // __ardour_dialog_h__
+
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index e9fae63677..5fb9dd95e7 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -79,7 +79,7 @@ class ColorManager;
namespace Gtkmm2ext {
class TearOff;
-};
+}
namespace ARDOUR {
class AudioEngine;
@@ -87,11 +87,11 @@ namespace ARDOUR {
class Port;
class IO;
class ControlProtocolInfo;
-};
+}
namespace ALSA {
class MultiChannelDevice;
-};
+}
#define FRAME_NAME "BaseFrame"
@@ -707,5 +707,5 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_control_protocol (ARDOUR::ControlProtocolInfo*);
};
-
#endif /* __ardour_gui_h__ */
+
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index 14dc6ba673..9ff5f45ddf 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -30,7 +30,7 @@
namespace ARDOUR {
class Session;
-};
+}
class AudioClock : public Gtk::HBox
{
@@ -40,7 +40,7 @@ class AudioClock : public Gtk::HBox
BBT,
MinSec,
Frames,
- Off,
+ Off
};
AudioClock (const string& name, bool editable, bool is_duration = false, bool with_tempo_meter = false);
@@ -87,7 +87,7 @@ class AudioClock : public Gtk::HBox
Bars,
Beats,
Ticks,
- AudioFrames,
+ AudioFrames
};
Gtk::EventBox audio_frames_ebox;
diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h
index dba588702f..ba92416339 100644
--- a/libs/ardour/ardour/ardour.h
+++ b/libs/ardour/ardour/ardour.h
@@ -74,7 +74,7 @@ namespace ARDOUR {
const char* old;
};
-};
+}
/* how do we make these be within the Ardour namespace? */
diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h
index 60b40e3df2..0a0c908d31 100644
--- a/libs/ardour/ardour/audio_diskstream.h
+++ b/libs/ardour/ardour/audio_diskstream.h
@@ -443,6 +443,6 @@ class AudioDiskstream : public Stateful, public sigc::trackable
void disengage_record_enable (void* src);
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_diskstream_h__ */
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index da12746c85..6cfb3ff3e3 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -162,6 +162,6 @@ class AudioTrack : public Route
bool _destructive;
};
-}; /* namespace ARDOUR*/
+} // namespace ARDOUR
#endif /* __ardour_audio_track_h__ */
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h
index 50bf7dddcc..8db795ae90 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -243,6 +243,6 @@ class AudioEngine : public sigc::trackable
mutable gint m_meter_exit;
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_audioengine_h__ */
diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h
index 47c304f86e..eca2a3a0bc 100644
--- a/libs/ardour/ardour/audiofilesource.h
+++ b/libs/ardour/ardour/audiofilesource.h
@@ -150,7 +150,7 @@ class AudioFileSource : public AudioSource {
bool writable() const { return _flags & Writable; }
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_audiofilesource_h__ */
diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h
index 009aa4b5b0..d7bb0c916b 100644
--- a/libs/ardour/ardour/audioregion.h
+++ b/libs/ardour/ardour/audioregion.h
@@ -127,8 +127,7 @@ class AudioRegion : public Region
Fast,
Slow,
LogA,
- LogB,
-
+ LogB
};
void set_fade_in_active (bool yn);
diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h
index cc4376f781..dd689e9a2d 100644
--- a/libs/ardour/ardour/configuration.h
+++ b/libs/ardour/ardour/configuration.h
@@ -99,6 +99,6 @@ class Configuration : public Stateful
extern Configuration *Config;
extern gain_t speed_quietning; /* see comment in configuration.cc */
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_configuration_h__ */
diff --git a/libs/ardour/ardour/curve.h b/libs/ardour/ardour/curve.h
index ede060e1cb..7f8a43cfe1 100644
--- a/libs/ardour/ardour/curve.h
+++ b/libs/ardour/ardour/curve.h
@@ -76,7 +76,7 @@ class Curve : public AutomationList
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
extern "C" {
void curve_get_vector_from_c (void *arg, double, double, float*, int32_t);
diff --git a/libs/ardour/ardour/export.h b/libs/ardour/ardour/export.h
index 9a6da1592b..075464767e 100644
--- a/libs/ardour/ardour/export.h
+++ b/libs/ardour/ardour/export.h
@@ -83,6 +83,6 @@ namespace ARDOUR
int status;
};
-};
+} // namespace ARDOUR
#endif /* __ardour_export_h__ */
diff --git a/libs/ardour/ardour/insert.h b/libs/ardour/ardour/insert.h
index 2d6b672064..c8ae6d46b0 100644
--- a/libs/ardour/ardour/insert.h
+++ b/libs/ardour/ardour/insert.h
@@ -175,6 +175,6 @@ class PluginInsert : public Insert
Plugin* plugin_factory (Plugin&);
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_insert_h__ */
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index 474d38a5bc..0356da8dc8 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -381,6 +381,6 @@ public:
int32_t find_output_port_hole ();
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /*__ardour_io_h__ */
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h
index 2c9f947541..30c02a80a1 100644
--- a/libs/ardour/ardour/location.h
+++ b/libs/ardour/ardour/location.h
@@ -199,6 +199,6 @@ class Locations : public Stateful, public StateManager
StateManager::State* state_factory (std::string why) const;
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_location_h__ */
diff --git a/libs/ardour/ardour/logcurve.h b/libs/ardour/ardour/logcurve.h
index e65be55772..ac60a10fd7 100644
--- a/libs/ardour/ardour/logcurve.h
+++ b/libs/ardour/ardour/logcurve.h
@@ -126,7 +126,7 @@ class LogCurveOut : public LogCurve
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_logcurve_h__ */
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h
index 37c985a2ef..75c59eb924 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -312,6 +312,6 @@ class Panner : public std::vector<StreamPanner*>, public Stateful, public sigc::
static float current_automation_version_number;
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /*__ardour_panner_h__ */
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h
index ff9c25e1c4..93ed2777e4 100644
--- a/libs/ardour/ardour/port.h
+++ b/libs/ardour/ardour/port.h
@@ -208,6 +208,6 @@ class Port : public sigc::trackable {
static jack_nframes_t short_over_length;
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_port_h__ */
diff --git a/libs/ardour/ardour/redirect.h b/libs/ardour/ardour/redirect.h
index ede55a1d80..8b08a41ce3 100644
--- a/libs/ardour/ardour/redirect.h
+++ b/libs/ardour/ardour/redirect.h
@@ -148,6 +148,6 @@ class Redirect : public IO
void* _gui; /* generic, we don't know or care what this is */
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_redirect_h__ */
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 6f0ce0ae4a..8e4a094082 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -62,7 +62,7 @@ class Route : public IO
enum Flag {
Hidden = 0x1,
MasterOut = 0x2,
- ControlOut = 0x4,
+ ControlOut = 0x4
};
@@ -352,6 +352,6 @@ class Route : public IO
void redirect_active_proxy (Redirect*, void*);
};
-}; /* namespace ARDOUR*/
+} // namespace ARDOUR
#endif /* __ardour_route_h__ */
diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h
index 19374b4f65..11253eda5b 100644
--- a/libs/ardour/ardour/route_group.h
+++ b/libs/ardour/ardour/route_group.h
@@ -43,7 +43,7 @@ class RouteGroup : public Stateful, public sigc::trackable {
enum Flag {
Relative = 0x1,
Active = 0x2,
- Hidden = 0x4,
+ Hidden = 0x4
};
RouteGroup (Session& s, const string &n, Flag f = Flag(0));
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index 54d4cbd7a9..0a068e8af0 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -58,6 +58,6 @@ class Send : public Redirect {
uint32_t expected_inputs;
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_send_h__ */
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 68a79d7320..8b49af19d6 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -115,7 +115,7 @@ class Session : public sigc::trackable, public Stateful
enum SlaveSource {
None = 0,
MTC,
- JACK,
+ JACK
};
enum AutoConnectOption {
@@ -146,7 +146,7 @@ class Session : public sigc::trackable, public Stateful
*/
StopOnce,
- AutoLoop,
+ AutoLoop
};
enum Action {
@@ -1760,6 +1760,6 @@ class Session : public sigc::trackable, public Stateful
void remove_controllable (PBD::Controllable*);
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __ardour_session_h__ */
diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h
index 55a0e990a0..4764339451 100644
--- a/libs/ardour/ardour/sndfilesource.h
+++ b/libs/ardour/ardour/sndfilesource.h
@@ -75,7 +75,7 @@ class SndFileSource : public AudioFileSource {
int setup_broadcast_info (jack_nframes_t when, struct tm&, time_t);
};
-}; /* namespace ARDOUR */
+} // namespace ARDOUR
#endif /* __sndfile_source_h__ */
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 2c6cbe61e2..fa1d121d02 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -71,7 +71,7 @@ namespace ARDOUR {
PanAutomation = 0x2,
PluginAutomation = 0x4,
SoloAutomation = 0x8,
- MuteAutomation = 0x10,
+ MuteAutomation = 0x10
};
enum AutoState {
@@ -190,7 +190,7 @@ namespace ARDOUR {
enum EditMode {
Slide,
- Splice,
+ Splice
};
enum RegionPoint {
@@ -243,7 +243,7 @@ namespace ARDOUR {
PeakDatum min;
PeakDatum max;
};
-};
+}
std::istream& operator>>(std::istream& o, ARDOUR::SampleFormat& sf);
std::istream& operator>>(std::istream& o, ARDOUR::HeaderFormat& sf);
diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc
index a56424cfea..4984e13fa9 100644
--- a/libs/ardour/panner.cc
+++ b/libs/ardour/panner.cc
@@ -1179,7 +1179,7 @@ struct PanPlugins {
PanPlugins pan_plugins[] = {
{ EqualPowerStereoPanner::name, 2, EqualPowerStereoPanner::factory },
{ Multi2dPanner::name, 3, Multi2dPanner::factory },
- { string (""), 0 }
+ { string (""), 0, 0 }
};
XMLNode&
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index b6b9746c92..35d56760a9 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2463,7 +2463,7 @@ remove_end(string* state)
statename = statename.substr (start+1);
}
- if ((end = statename.rfind(".ardour")) < 0) {
+ if ((end = statename.rfind(".ardour")) == string::npos) {
end = statename.length();
}
diff --git a/libs/midi++2/SConscript b/libs/midi++2/SConscript
index 63a3b04f8d..696fed6b5b 100644
--- a/libs/midi++2/SConscript
+++ b/libs/midi++2/SConscript
@@ -18,7 +18,6 @@ fd_midiport.cc
fifomidi.cc
midi.cc
midichannel.cc
-midicontrollable.cc
midifactory.cc
midimanager.cc
midiparser.cc
diff --git a/libs/midi++2/midi++/channel.h b/libs/midi++2/midi++/channel.h
index 1efde3cb93..f8dbb6e194 100644
--- a/libs/midi++2/midi++/channel.h
+++ b/libs/midi++2/midi++/channel.h
@@ -152,7 +152,7 @@ class Channel : public sigc::trackable {
void process_reset (Parser &);
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __midichannel_h__
diff --git a/libs/midi++2/midi++/controllable.h b/libs/midi++2/midi++/controllable.h
deleted file mode 100644
index 3fa108bb46..0000000000
--- a/libs/midi++2/midi++/controllable.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#ifndef __qm_midicontrollable_h__
-#define __qm_midicontrollable_h__
-
-#include <string>
-
-#include <sigc++/sigc++.h>
-
-#include <midi++/types.h>
-
-namespace MIDI {
-
-class Channel;
-class Port;
-class Parser;
-
-class Controllable : public sigc::trackable
-{
- public:
- Controllable (Port *, bool bistate = false);
- virtual ~Controllable ();
-
- void midi_rebind (Port *, channel_t channel=-1);
- void midi_forget ();
- void learn_about_external_control ();
- void stop_learning ();
- void drop_external_control ();
-
- virtual void set_value (float) = 0;
-
- sigc::signal<void> learning_started;
- sigc::signal<void> learning_stopped;
-
- bool get_control_info (channel_t&, eventType&, byte&);
- void set_control_type (channel_t, eventType, byte);
-
- bool get_midi_feedback () { return feedback; }
- void set_midi_feedback (bool val) { feedback = val; }
-
- Port * get_port() { return port; }
-
- std::string control_description() const { return _control_description; }
-
- void send_midi_feedback (float);
-
- private:
- bool bistate;
- int midi_msg_id; /* controller ID or note number */
- sigc::connection midi_sense_connection[2];
- sigc::connection midi_learn_connection;
- size_t connections;
- Port* port;
- eventType control_type;
- byte control_additional;
- channel_t control_channel;
- std::string _control_description;
- bool feedback;
-
- void midi_receiver (Parser &p, byte *, size_t);
- void midi_sense_note (Parser &, EventTwoBytes *, bool is_on);
- void midi_sense_note_on (Parser &p, EventTwoBytes *tb);
- void midi_sense_note_off (Parser &p, EventTwoBytes *tb);
- void midi_sense_controller (Parser &, EventTwoBytes *);
- void midi_sense_program_change (Parser &, byte);
- void midi_sense_pitchbend (Parser &, pitchbend_t);
-
- void bind_midi (channel_t, eventType, byte);
-};
-
-}; /* namespace MIDI */
-
-#endif // __qm_midicontrollable_h__
-
diff --git a/libs/midi++2/midi++/coremidi_midiport.h b/libs/midi++2/midi++/coremidi_midiport.h
index e02a225784..d7df23aa04 100644
--- a/libs/midi++2/midi++/coremidi_midiport.h
+++ b/libs/midi++2/midi++/coremidi_midiport.h
@@ -62,6 +62,6 @@ namespace MIDI {
bool firstrecv;
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __coremidi_midiport_h__
diff --git a/libs/midi++2/midi++/factory.h b/libs/midi++2/midi++/factory.h
index 1543f68cdc..7b4122d791 100644
--- a/libs/midi++2/midi++/factory.h
+++ b/libs/midi++2/midi++/factory.h
@@ -35,6 +35,6 @@ class PortFactory {
const std::string &reqstr);
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __midi_factory_h__
diff --git a/libs/midi++2/midi++/fd_midiport.h b/libs/midi++2/midi++/fd_midiport.h
index 853af9d7b4..6a9b8f74d1 100644
--- a/libs/midi++2/midi++/fd_midiport.h
+++ b/libs/midi++2/midi++/fd_midiport.h
@@ -89,6 +89,6 @@ class FD_MidiPort : public Port
int do_slow_write (byte *msg, unsigned int msglen);
};
-}; /*namespace MIDI */
+} // namespace MIDI
#endif // __fd_midiport_h__
diff --git a/libs/midi++2/midi++/fifomidi.h b/libs/midi++2/midi++/fifomidi.h
index eb8778d4d5..200d90eda8 100644
--- a/libs/midi++2/midi++/fifomidi.h
+++ b/libs/midi++2/midi++/fifomidi.h
@@ -42,6 +42,6 @@ class FIFO_MidiPort : public MIDI::FD_MidiPort
void open (PortRequest &req);
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __fifomidi_h__
diff --git a/libs/midi++2/midi++/manager.h b/libs/midi++2/midi++/manager.h
index 4889aad8c9..1bf8dc7cbd 100644
--- a/libs/midi++2/midi++/manager.h
+++ b/libs/midi++2/midi++/manager.h
@@ -83,6 +83,6 @@ class Manager {
void close_ports ();
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __midi_manager_h__
diff --git a/libs/midi++2/midi++/mmc.h b/libs/midi++2/midi++/mmc.h
index 7b51b33a72..2d569f122c 100644
--- a/libs/midi++2/midi++/mmc.h
+++ b/libs/midi++2/midi++/mmc.h
@@ -82,7 +82,7 @@ class MachineControl : public sigc::trackable
cmdRecordStrobeVariable = 0x55,
cmdWait = 0x7C,
- cmdResume = 0x7F,
+ cmdResume = 0x7F
};
MachineControl (Port &port,
@@ -256,6 +256,6 @@ class MachineControl : public sigc::trackable
void write_track_record_ready (byte *, size_t len);
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif /* __midipp_mmc_h_h__ */
diff --git a/libs/midi++2/midi++/nullmidi.h b/libs/midi++2/midi++/nullmidi.h
index a94b1015b0..a74e5e3d9b 100644
--- a/libs/midi++2/midi++/nullmidi.h
+++ b/libs/midi++2/midi++/nullmidi.h
@@ -57,6 +57,6 @@ class Null_MidiPort : public Port
virtual int selectable() const { return -1; }
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __nullmidi_h__
diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h
index 4ac07cc15d..36d19f3da9 100644
--- a/libs/midi++2/midi++/parser.h
+++ b/libs/midi++2/midi++/parser.h
@@ -183,7 +183,7 @@ class Parser : public sigc::trackable {
void process_mtc_quarter_frame (byte *msg);
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __midi_parse_h__
diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h
index a186f1fd5f..4a5319b120 100644
--- a/libs/midi++2/midi++/port.h
+++ b/libs/midi++2/midi++/port.h
@@ -40,7 +40,7 @@ class Port : public sigc::trackable {
ALSA_Sequencer,
CoreMidi_MidiPort,
Null,
- FIFO,
+ FIFO
};
@@ -140,7 +140,6 @@ class Port : public sigc::trackable {
static size_t nports;
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __libmidi_port_h__
-
diff --git a/libs/midi++2/midi++/port_request.h b/libs/midi++2/midi++/port_request.h
index 28a0d1d70b..86838dd04d 100644
--- a/libs/midi++2/midi++/port_request.h
+++ b/libs/midi++2/midi++/port_request.h
@@ -54,7 +54,7 @@ struct PortRequest {
const std::string &xtype);
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __midi_port_request_h__
diff --git a/libs/midi++2/midi++/types.h b/libs/midi++2/midi++/types.h
index b9d9bf33e7..218416d213 100644
--- a/libs/midi++2/midi++/types.h
+++ b/libs/midi++2/midi++/types.h
@@ -57,10 +57,10 @@ namespace MIDI {
enum MTC_Status {
MTC_Stopped = 0,
MTC_Forward,
- MTC_Backward,
+ MTC_Backward
};
-}; /* namespace MIDI */
+} // namespace MIDI
#endif // __midi_types_h__
diff --git a/libs/midi++2/midicontrollable.cc b/libs/midi++2/midicontrollable.cc
deleted file mode 100644
index f0dbd9cb77..0000000000
--- a/libs/midi++2/midicontrollable.cc
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- Copyright (C) 1998-99 Paul Barton-Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <cstdio> /* for sprintf, sigh */
-#include <pbd/error.h>
-#include <midi++/port.h>
-#include <midi++/channel.h>
-#include <midi++/controllable.h>
-
-using namespace sigc;
-using namespace MIDI;
-using namespace PBD;
-
-Controllable::Controllable (Port *p, bool is_bistate)
-{
- control_type = none;
- _control_description = "MIDI Control: none";
- control_additional = (byte) -1;
- bistate = is_bistate;
- connections = 0;
- feedback = true; // for now
-
- /* use channel 0 ("1") as the initial channel */
-
- midi_rebind (p, 0);
-}
-
-Controllable::~Controllable ()
-{
- drop_external_control ();
-}
-
-void
-Controllable::midi_forget ()
-{
- /* stop listening for incoming messages, but retain
- our existing event + type information.
- */
-
- if (connections > 0) {
- midi_sense_connection[0].disconnect ();
- }
-
- if (connections > 1) {
- midi_sense_connection[1].disconnect ();
- }
-
- connections = 0;
- midi_learn_connection.disconnect ();
-
-}
-
-void
-Controllable::midi_rebind (Port *p, channel_t c)
-{
- if ((port = p) == 0) {
- midi_forget ();
- } else {
- if (c >= 0) {
- bind_midi (c, control_type, control_additional);
- } else {
- midi_forget ();
- }
- }
-}
-
-void
-Controllable::learn_about_external_control ()
-{
- drop_external_control ();
-
- if (port) {
- midi_learn_connection = port->input()->any.connect (mem_fun (*this, &Controllable::midi_receiver));
- learning_started ();
-
- } else {
- info << "No MIDI port specified - external control disabled" << endmsg;
- }
-}
-
-void
-Controllable::stop_learning ()
-{
- midi_learn_connection.disconnect ();
-}
-
-void
-Controllable::drop_external_control ()
-{
- if (connections > 0) {
- midi_sense_connection[0].disconnect ();
- }
- if (connections > 1) {
- midi_sense_connection[1].disconnect ();
- }
-
- connections = 0;
- midi_learn_connection.disconnect ();
-
- control_type = none;
- control_additional = (byte) -1;
-}
-
-void
-Controllable::midi_sense_note_on (Parser &p, EventTwoBytes *tb)
-{
- midi_sense_note (p, tb, true);
-}
-
-void
-Controllable::midi_sense_note_off (Parser &p, EventTwoBytes *tb)
-{
- midi_sense_note (p, tb, false);
-}
-
-void
-Controllable::midi_sense_note (Parser &p, EventTwoBytes *msg, bool is_on)
-{
- if (!bistate) {
- set_value (msg->note_number/127.0);
- } else {
-
- /* Note: parser handles the use of zero velocity to
- mean note off. if we get called with is_on=true, then we
- got a *real* note on.
- */
-
- if (msg->note_number == control_additional) {
- set_value (is_on ? 1 : 0);
- }
- }
-}
-
-void
-Controllable::midi_sense_controller (Parser &, EventTwoBytes *msg)
-{
- if (control_additional == msg->controller_number) {
- if (!bistate) {
- set_value (msg->value/127.0);
- } else {
- if (msg->value > 64.0) {
- set_value (1);
- } else {
- set_value (0);
- }
- }
- }
-}
-
-void
-Controllable::midi_sense_program_change (Parser &p, byte msg)
-{
- /* XXX program change messages make no sense for bistates */
-
- if (!bistate) {
- set_value (msg/127.0);
- }
-}
-
-void
-Controllable::midi_sense_pitchbend (Parser &p, pitchbend_t pb)
-{
- /* pitchbend messages make no sense for bistates */
-
- /* XXX gack - get rid of assumption about typeof pitchbend_t */
-
- set_value ((pb/(float) SHRT_MAX));
-}
-
-void
-Controllable::midi_receiver (Parser &p, byte *msg, size_t len)
-{
- /* we only respond to channel messages */
-
- if ((msg[0] & 0xF0) < 0x80 || (msg[0] & 0xF0) > 0xE0) {
- return;
- }
-
- /* if the our port doesn't do input anymore, forget it ... */
-
- if (!port->input()) {
- return;
- }
-
- bind_midi ((channel_t) (msg[0] & 0xf), eventType (msg[0] & 0xF0), msg[1]);
-
- learning_stopped ();
-}
-
-void
-Controllable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
-{
- char buf[64];
-
- drop_external_control ();
-
- control_type = ev;
- control_channel = chn;
- control_additional = additional;
-
- if (port == 0 || port->input() == 0) {
- return;
- }
-
- Parser& p = *port->input();
-
- int chn_i = chn;
- switch (ev) {
- case MIDI::off:
- midi_sense_connection[0] = p.channel_note_off[chn_i].connect
- (mem_fun (*this, &Controllable::midi_sense_note_off));
-
- /* if this is a bistate, connect to noteOn as well,
- and we'll toggle back and forth between the two.
- */
-
- if (bistate) {
- midi_sense_connection[1] = p.channel_note_on[chn_i].connect
- (mem_fun (*this, &Controllable::midi_sense_note_on));
- connections = 2;
- } else {
- connections = 1;
- }
- _control_description = "MIDI control: NoteOff";
- break;
-
- case MIDI::on:
- midi_sense_connection[0] = p.channel_note_on[chn_i].connect
- (mem_fun (*this, &Controllable::midi_sense_note_on));
- if (bistate) {
- midi_sense_connection[1] = p.channel_note_off[chn_i].connect
- (mem_fun (*this, &Controllable::midi_sense_note_off));
- connections = 2;
- } else {
- connections = 1;
- }
- _control_description = "MIDI control: NoteOn";
- break;
-
- case MIDI::controller:
- midi_sense_connection[0] = p.channel_controller[chn_i].connect
- (mem_fun (*this, &Controllable::midi_sense_controller));
- connections = 1;
- snprintf (buf, sizeof (buf), "MIDI control: Controller %d", control_additional);
- _control_description = buf;
- break;
-
- case MIDI::program:
- if (!bistate) {
- midi_sense_connection[0] = p.channel_program_change[chn_i].connect
- (mem_fun (*this,
- &Controllable::midi_sense_program_change));
- connections = 1;
- _control_description = "MIDI control: ProgramChange";
- }
- break;
-
- case MIDI::pitchbend:
- if (!bistate) {
- midi_sense_connection[0] = p.channel_pitchbend[chn_i].connect
- (mem_fun (*this, &Controllable::midi_sense_pitchbend));
- connections = 1;
- _control_description = "MIDI control: Pitchbend";
- }
- break;
-
- default:
- break;
- }
-}
-
-void
-Controllable::set_control_type (channel_t chn, eventType ev, MIDI::byte additional)
-{
- bind_midi (chn, ev, additional);
-}
-
-bool
-Controllable::get_control_info (channel_t& chn, eventType& ev, byte& additional)
-{
- if (control_type == none) {
- chn = -1;
- return false;
- }
-
- ev = control_type;
- chn = control_channel;
- additional = control_additional;
-
- return true;
-}
-
-
-void
-Controllable::send_midi_feedback (float val)
-{
- byte msg[3];
-
- if (port == 0 || control_type == none) {
- return;
- }
-
- msg[0] = (control_type & 0xF0) | (control_channel & 0xF);
- msg[1] = control_additional;
- msg[2] = (byte) (val * 127.0f);
-
- port->write (msg, 3);
-}
-
diff --git a/libs/midi++2/midiparser.cc b/libs/midi++2/midiparser.cc
index 04ac2728f1..424bfa04f8 100644
--- a/libs/midi++2/midiparser.cc
+++ b/libs/midi++2/midiparser.cc
@@ -101,7 +101,7 @@ Parser::midi_event_type_name (eventType t)
default:
return "unknow MIDI event type";
}
-};
+}
Parser::Parser (Port &p)
: _port (p)
diff --git a/libs/pbd/pbd/basename.h b/libs/pbd/pbd/basename.h
index 35aebe166c..a7e36acff0 100644
--- a/libs/pbd/pbd/basename.h
+++ b/libs/pbd/pbd/basename.h
@@ -8,6 +8,6 @@ namespace PBD
extern std::string basename_nosuffix (const std::string&);
-};
+} // namespace PBD
#endif // __stupid_basename_h__
diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc
index 089766482d..be8032b7b6 100644
--- a/libs/pbd/pool.cc
+++ b/libs/pbd/pool.cc
@@ -70,7 +70,7 @@ Pool::alloc ()
} else {
return ptr;
}
-};
+}
void
Pool::release (void *ptr)
diff --git a/libs/soundtouch/STTypes.h b/libs/soundtouch/STTypes.h
index dc6a97001a..c404675ecd 100644
--- a/libs/soundtouch/STTypes.h
+++ b/libs/soundtouch/STTypes.h
@@ -105,6 +105,6 @@ namespace soundtouch
#endif
#endif // INTEGER_SAMPLES
-};
+}
#endif