[Summary] Fixed bug 45140: New Sample Rate is not applied to the recorded region right after the change

[Reviewed by] PDavis
This commit is contained in:
GZharun 2015-02-13 21:16:09 +02:00
parent dd04f98a19
commit aad0d77314
3 changed files with 15 additions and 0 deletions

View file

@ -1507,6 +1507,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
typedef std::map<PBD::ID,boost::shared_ptr<Source> > SourceMap;
private:
void reset_write_sources (bool mark_write_complete, bool force = false);
SourceMap sources;
private:

View file

@ -1793,6 +1793,7 @@ Session::set_frame_rate (framecnt_t frames_per_second)
clear_clicks ();
reset_write_sources (false);
// XXX we need some equivalent to this, somehow
// SndFileSource::setup_standard_crossfades (frames_per_second);

View file

@ -1903,6 +1903,18 @@ Session::get_sources_as_xml ()
return *node;
}
void
Session::reset_write_sources (bool mark_write_complete, bool force)
{
boost::shared_ptr<RouteList> rl = routes.reader();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr) {
tr->reset_write_sources(mark_write_complete, force);
}
}
}
int
Session::load_sources (const XMLNode& node)
{