mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 21:56:30 +01:00
after changing session SR, reset all write sources to use new rate
This commit is contained in:
parent
c4e3135617
commit
f116455280
2 changed files with 9 additions and 10 deletions
|
|
@ -1924,7 +1924,8 @@ Session::set_frame_rate (framecnt_t frames_per_second)
|
||||||
sync_time_vars();
|
sync_time_vars();
|
||||||
|
|
||||||
clear_clicks ();
|
clear_clicks ();
|
||||||
|
reset_write_sources (false);
|
||||||
|
|
||||||
// XXX we need some equivalent to this, somehow
|
// XXX we need some equivalent to this, somehow
|
||||||
// SndFileSource::setup_standard_crossfades (frames_per_second);
|
// SndFileSource::setup_standard_crossfades (frames_per_second);
|
||||||
|
|
||||||
|
|
@ -5012,12 +5013,12 @@ void
|
||||||
Session::reset_native_file_format ()
|
Session::reset_native_file_format ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<RouteList> rl = routes.reader ();
|
boost::shared_ptr<RouteList> rl = routes.reader ();
|
||||||
|
|
||||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||||
if (tr) {
|
if (tr) {
|
||||||
/* don't save state as we do this, there's no point
|
/* don't save state as we do this, there's no point
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_state_of_the_state = StateOfTheState (_state_of_the_state|InCleanup);
|
_state_of_the_state = StateOfTheState (_state_of_the_state|InCleanup);
|
||||||
tr->reset_write_sources (false);
|
tr->reset_write_sources (false);
|
||||||
_state_of_the_state = StateOfTheState (_state_of_the_state & ~InCleanup);
|
_state_of_the_state = StateOfTheState (_state_of_the_state & ~InCleanup);
|
||||||
|
|
|
||||||
|
|
@ -1908,17 +1908,15 @@ Session::get_sources_as_xml ()
|
||||||
void
|
void
|
||||||
Session::reset_write_sources (bool mark_write_complete, bool force)
|
Session::reset_write_sources (bool mark_write_complete, bool force)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<RouteList> rl = routes.reader();
|
boost::shared_ptr<RouteList> rl = routes.reader();
|
||||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||||
if (tr) {
|
if (tr) {
|
||||||
|
|
||||||
// block state saving
|
|
||||||
_state_of_the_state = StateOfTheState (_state_of_the_state|InCleanup);
|
_state_of_the_state = StateOfTheState (_state_of_the_state|InCleanup);
|
||||||
tr->reset_write_sources(mark_write_complete, force);
|
tr->reset_write_sources(mark_write_complete, force);
|
||||||
_state_of_the_state = StateOfTheState (_state_of_the_state & ~InCleanup);
|
_state_of_the_state = StateOfTheState (_state_of_the_state & ~InCleanup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue