diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-27 16:52:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-27 16:52:14 +0000 |
commit | cc2767caf32486365a33814149e75c6e588e8603 (patch) | |
tree | 9d41c606a20ba2e2bb43be653e42050d38293a2e /libs/ardour/audio_track.cc | |
parent | d23fec7b9a0f076256dbd71faae254a78efbe37a (diff) |
added RCU handling of Session route list, and major use of shared_ptr<T> everywhere else. plus a few bug fixes for issues discovered with -Wextra
git-svn-id: svn://localhost/ardour2/trunk@707 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_track.cc')
-rw-r--r-- | libs/ardour/audio_track.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 29496584f6..f425f0172e 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -438,8 +438,8 @@ AudioTrack::set_state_part_two () continue; } - FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front())); - frii->insert = 0; + FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo (*((*citer)->children().front()), + boost::shared_ptr<Insert>()); frii->id = prop->value (); _freeze_record.insert_info.push_back (frii); } @@ -756,9 +756,9 @@ AudioTrack::export_stuff (vector<Sample*>& buffers, char * workbuf, uint32_t nbu */ for (i = _redirects.begin(); i != _redirects.end(); ++i) { - Insert *insert; + boost::shared_ptr<Insert> insert; - if ((insert = dynamic_cast<Insert*>(*i)) != 0) { + if ((insert = boost::dynamic_pointer_cast<Insert>(*i)) != 0) { switch (insert->placement()) { case PreFader: insert->run (buffers, nbufs, nframes, 0); @@ -794,9 +794,9 @@ AudioTrack::export_stuff (vector<Sample*>& buffers, char * workbuf, uint32_t nbu if (post_fader_work) { for (i = _redirects.begin(); i != _redirects.end(); ++i) { - PluginInsert *insert; + boost::shared_ptr<PluginInsert> insert; - if ((insert = dynamic_cast<PluginInsert*>(*i)) != 0) { + if ((insert = boost::dynamic_pointer_cast<PluginInsert>(*i)) != 0) { switch ((*i)->placement()) { case PreFader: break; @@ -852,7 +852,6 @@ AudioTrack::bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadI void AudioTrack::freeze (InterThreadInfo& itt) { - Insert* insert; vector<AudioSource*> srcs; string new_playlist_name; Playlist* new_playlist; @@ -900,11 +899,12 @@ AudioTrack::freeze (InterThreadInfo& itt) for (RedirectList::iterator r = _redirects.begin(); r != _redirects.end(); ++r) { - if ((insert = dynamic_cast<Insert*>(*r)) != 0) { + boost::shared_ptr<Insert> insert; + + if ((insert = boost::dynamic_pointer_cast<Insert>(*r)) != 0) { - FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo ((*r)->get_state()); + FreezeRecordInsertInfo* frii = new FreezeRecordInsertInfo ((*r)->get_state(), insert); - frii->insert = insert; frii->id = insert->id(); frii->memento = (*r)->get_memento(); |