diff options
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/bundle.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/control_protocol_manager.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/export_status.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/import_status.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/interthread_info.h | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_buffer.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/named_selection.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/playlist.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/session_event.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 3 | ||||
-rw-r--r-- | libs/ardour/export_format_manager.cc | 6 | ||||
-rw-r--r-- | libs/ardour/globals.cc | 6 | ||||
-rw-r--r-- | libs/ardour/midi_playlist.cc | 6 | ||||
-rw-r--r-- | libs/ardour/midi_ring_buffer.cc | 4 |
14 files changed, 35 insertions, 23 deletions
diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h index 2bf614e75f..e84349c647 100644 --- a/libs/ardour/ardour/bundle.h +++ b/libs/ardour/ardour/bundle.h @@ -149,8 +149,9 @@ class Bundle : public PBD::ScopedConnectionList Change _pending_change; }; -struct BundleChannel +class BundleChannel { +public: BundleChannel () : channel (-1) {} BundleChannel (boost::shared_ptr<Bundle> b, int c) diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h index 19abbaf6be..20358025f1 100644 --- a/libs/ardour/ardour/control_protocol_manager.h +++ b/libs/ardour/ardour/control_protocol_manager.h @@ -35,7 +35,8 @@ class ControlProtocol; class ControlProtocolDescriptor; class Session; -struct ControlProtocolInfo { +class ControlProtocolInfo { +public: ControlProtocolDescriptor* descriptor; ControlProtocol* protocol; std::string name; diff --git a/libs/ardour/ardour/export_status.h b/libs/ardour/ardour/export_status.h index 56b15eada1..164b348c37 100644 --- a/libs/ardour/ardour/export_status.h +++ b/libs/ardour/ardour/export_status.h @@ -31,8 +31,8 @@ namespace ARDOUR { -struct ExportStatus { - +class ExportStatus { + public: ExportStatus (); void init (); diff --git a/libs/ardour/ardour/import_status.h b/libs/ardour/ardour/import_status.h index 1753abe655..c261b7a960 100644 --- a/libs/ardour/ardour/import_status.h +++ b/libs/ardour/ardour/import_status.h @@ -30,7 +30,8 @@ namespace ARDOUR { -struct ImportStatus : public InterThreadInfo { +class ImportStatus : public InterThreadInfo { +public: std::string doing_what; /* control info */ diff --git a/libs/ardour/ardour/interthread_info.h b/libs/ardour/ardour/interthread_info.h index 908276067a..01cacf437c 100644 --- a/libs/ardour/ardour/interthread_info.h +++ b/libs/ardour/ardour/interthread_info.h @@ -27,14 +27,15 @@ namespace ARDOUR { - struct InterThreadInfo { + class InterThreadInfo { + public: InterThreadInfo () : done (false), cancel (false), progress (0), thread (0) {} volatile bool done; volatile bool cancel; volatile float progress; pthread_t thread; - ProcessThread process_thread; + ProcessThread process_thread; }; } // namespace diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h index db02344249..183ca7eea9 100644 --- a/libs/ardour/ardour/midi_buffer.h +++ b/libs/ardour/ardour/midi_buffer.h @@ -53,7 +53,8 @@ public: bool merge_in_place(const MidiBuffer &other); template<typename BufferType, typename EventType> - struct iterator_base { + class iterator_base { + public: iterator_base<BufferType, EventType>(BufferType& b, framecnt_t o) : buffer(b), offset(o) {} inline EventType operator*() const { uint8_t* ev_start = buffer._data + offset + sizeof(TimeType); diff --git a/libs/ardour/ardour/named_selection.h b/libs/ardour/ardour/named_selection.h index f03db20574..c120848328 100644 --- a/libs/ardour/ardour/named_selection.h +++ b/libs/ardour/ardour/named_selection.h @@ -34,8 +34,9 @@ namespace ARDOUR class Session; class Playlist; -struct NamedSelection : public PBD::Stateful +class NamedSelection : public PBD::Stateful { +public: NamedSelection (std::string, std::list<boost::shared_ptr<Playlist> >&); NamedSelection (Session&, const XMLNode&); virtual ~NamedSelection (); diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index ff2ac35954..59b7ae406c 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -230,12 +230,14 @@ public: friend class Session; protected: - struct RegionReadLock : public Glib::RWLock::ReaderLock { + class RegionReadLock : public Glib::RWLock::ReaderLock { + public: RegionReadLock (Playlist *pl) : Glib::RWLock::ReaderLock (pl->region_lock) {} ~RegionReadLock() {} }; - struct RegionWriteLock : public Glib::RWLock::WriterLock { + class RegionWriteLock : public Glib::RWLock::WriterLock { + public: RegionWriteLock (Playlist *pl, bool do_block_notify = true) : Glib::RWLock::WriterLock (pl->region_lock) , playlist (pl) diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index 27f778b8ac..932ddc9176 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -16,7 +16,8 @@ namespace ARDOUR { class Slave; class Region; -struct SessionEvent { +class SessionEvent { +public: enum Type { SetTransportSpeed, SetTrackSpeed, diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 6ac9ebfe70..6d05bdbbd8 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -213,7 +213,8 @@ namespace ARDOUR { timecode_60 }; - struct AnyTime { + class AnyTime { + public: enum Type { Timecode, BBT, diff --git a/libs/ardour/export_format_manager.cc b/libs/ardour/export_format_manager.cc index f995bc1b0e..23a77925fe 100644 --- a/libs/ardour/export_format_manager.cc +++ b/libs/ardour/export_format_manager.cc @@ -239,7 +239,7 @@ ExportFormatManager::add_format (ExportFormatPtr ptr) boost::shared_ptr<HasSampleFormat> hsf; - if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (ptr)) { + if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (ptr))) { hsf->SampleFormatSelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_sample_format_selection, this, _1, _2)); hsf->DitherTypeSelectChanged.connect_same_thread (*this, boost::bind (&ExportFormatManager::change_dither_type_selection, this, _1, _2)); } @@ -682,7 +682,7 @@ ExportFormatManager::selection_changed () } boost::shared_ptr<HasSampleFormat> hsf; - if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format())) { + if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format()))) { SampleFormatList sf_list = hsf->get_sample_formats(); for (SampleFormatList::iterator it = sf_list.begin(); it != sf_list.end(); ++it) { @@ -747,7 +747,7 @@ ExportFormatManager::get_selected_sample_format () { boost::shared_ptr<HasSampleFormat> hsf; - if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format())) { + if ((hsf = boost::dynamic_pointer_cast<HasSampleFormat> (get_selected_format()))) { return hsf->get_selected_sample_format (); } else { return SampleFormatPtr (); diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 1560e96a97..0e0c508a58 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -112,7 +112,9 @@ mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0; PBD::Signal1<void,std::string> ARDOUR::BootMessage; -void ARDOUR::setup_enum_writer (); +namespace ARDOUR { +extern void setup_enum_writer (); +} /* this is useful for quite a few things that want to check if any bounds-related property has changed @@ -277,7 +279,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization) Stateful::current_state_version = CURRENT_SESSION_FILE_VERSION; - setup_enum_writer (); + ARDOUR::setup_enum_writer (); // allow ardour the absolute maximum number of open files lotsa_files_please (); diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index 4bbedcecd8..9aa36304a6 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -21,6 +21,7 @@ #include <algorithm> #include <iostream> +#include <utility> #include <stdlib.h> @@ -257,10 +258,7 @@ MidiPlaylist::read (Evoral::EventSink<framepos_t>& dst, framepos_t start, framec } else { if (new_tracker) { - pair<Region*,MidiStateTracker*> newpair; - newpair.first = mr.get(); - newpair.second = tracker; - _note_trackers.insert (newpair).first; + _note_trackers.insert (make_pair (mr.get(), tracker)); DEBUG_TRACE (DEBUG::MidiPlaylistIO, "\tadded tracker to trackers\n"); } } diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc index 4ad563eec9..30f42aba19 100644 --- a/libs/ardour/midi_ring_buffer.cc +++ b/libs/ardour/midi_ring_buffer.cc @@ -25,9 +25,10 @@ #include "ardour/event_type_map.h" using namespace std; -using namespace ARDOUR; using namespace PBD; +namespace ARDOUR { + /** Read a block of MIDI events from this buffer into a MidiBuffer. * * Timestamps of events returned are relative to start (i.e. event with stamp 0 @@ -279,3 +280,4 @@ MidiRingBuffer<T>::reset_tracker () template class MidiRingBuffer<framepos_t>; +} // namespace ARDOUR |