diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-07 23:51:30 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-07 23:51:30 +0000 |
commit | 8b46567e0677eb25c965ed46b80da8808fa33b2b (patch) | |
tree | f34e3d1cbdab142e7f155d981fee5fb56a82c431 /libs/ardour/session.cc | |
parent | 6f2e8de6a05d9d52069fa1f95c3264b5f151df5f (diff) |
id_t becomes a fully-fledged object, UUID's used for IDs, generic MIDI now owns bindings, MIDI binding concept removed from libardour itself in favor of generic Controllables
git-svn-id: svn://localhost/ardour2/trunk@669 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 864e6178d2..3f400b0b2b 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -90,6 +90,8 @@ Session::mix_buffers_no_gain_t Session::mix_buffers_no_gain = 0; sigc::signal<int> Session::AskAboutPendingState; sigc::signal<void> Session::SMPTEOffsetChanged; +sigc::signal<void> Session::SendFeedback; + int Session::find_session (string str, string& path, string& snapshot, bool& isnew) @@ -438,7 +440,7 @@ Session::~Session () tmp =i; ++tmp; - delete (*i).second; + delete i->second; i = tmp; } @@ -477,7 +479,7 @@ Session::~Session () tmp = i; ++tmp; - delete (*i).second; + delete i->second; i = tmp; } @@ -2289,7 +2291,7 @@ Session::diskstream_by_name (string name) } AudioDiskstream * -Session::diskstream_by_id (id_t id) +Session::diskstream_by_id (const PBD::ID& id) { Glib::RWLock::ReaderLock lm (diskstream_lock); @@ -2337,7 +2339,7 @@ Session::new_region_name (string old) sbuf = buf; for (i = audio_regions.begin(); i != audio_regions.end(); ++i) { - if ((*i).second->name() == sbuf) { + if (i->second->name() == sbuf) { break; } } @@ -2402,7 +2404,7 @@ Session::region_name (string& result, string base, bool newlevel) const name_taken = false; for (AudioRegionList::const_iterator i = audio_regions.begin(); i != audio_regions.end(); ++i) { - if ((*i).second->name() == result) { + if (i->second->name() == result) { name_taken = true; break; } @@ -2447,8 +2449,8 @@ Session::add_region (Region* region) if (x == audio_regions.end()) { - pair<AudioRegionList::key_type, AudioRegionList::mapped_type> entry; - + pair<AudioRegionList::key_type,AudioRegionList::mapped_type> entry; + entry.first = region->id(); entry.second = ar; @@ -2505,16 +2507,18 @@ Session::remove_region (Region* region) AudioRegionList::iterator i; AudioRegion* ar = 0; bool removed = false; - + { Glib::Mutex::Lock lm (region_lock); - if ((ar = dynamic_cast<AudioRegion*> (region)) != 0) { + if ((ar = dynamic_cast<AudioRegion*> (region)) != 0) { if ((i = audio_regions.find (region->id())) != audio_regions.end()) { audio_regions.erase (i); removed = true; - } + } + } else { + fatal << _("programming error: ") << X_("unknown region type passed to Session::remove_region()") << endmsg; @@ -2542,7 +2546,7 @@ Session::find_whole_file_parent (AudioRegion& child) for (i = audio_regions.begin(); i != audio_regions.end(); ++i) { - region = (*i).second; + region = i->second; if (region->whole_file()) { @@ -2646,12 +2650,12 @@ Session::add_audio_source (AudioSource* source) { pair<AudioSourceList::key_type, AudioSourceList::mapped_type> entry; - { - Glib::Mutex::Lock lm (audio_source_lock); + { + Glib::Mutex::Lock lm (audio_source_lock); entry.first = source->id(); entry.second = source; audio_sources.insert (entry); - } + } source->GoingAway.connect (mem_fun (this, &Session::remove_source)); set_dirty(); @@ -2669,7 +2673,7 @@ Session::remove_source (Source* source) if ((i = audio_sources.find (source->id())) != audio_sources.end()) { audio_sources.erase (i); - } + } } if (!_state_of_the_state & InCleanup) { @@ -2685,23 +2689,19 @@ Session::remove_source (Source* source) } Source * -Session::get_source (ARDOUR::id_t id) +Session::source_by_id (const PBD::ID& id) { Glib::Mutex::Lock lm (audio_source_lock); AudioSourceList::iterator i; Source* source = 0; if ((i = audio_sources.find (id)) != audio_sources.end()) { - source = (*i).second; - } - - if (source) { - return source; + source = i->second; } /* XXX search MIDI or other searches here */ - return 0; + return source; } string |