X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fdiskstream.cc;h=cc683c2450105c78bc299c14f68dc40534a28184;hb=8ab17e96312f1a61c014c50687e15430d5ae786b;hp=c9c11cc92d06969b43b877dad36b57b5b6beb5ff;hpb=fc26b49ac5e177857a155a567ff9f966f330e261;p=ardour.git diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index c9c11cc92d..cc683c2450 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -61,20 +61,19 @@ using namespace PBD; * default from configuration_vars.h). 0 is not a good value for * allocating buffer sizes.. */ -nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256; +ARDOUR::nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256; sigc::signal Diskstream::DiskOverrun; sigc::signal Diskstream::DiskUnderrun; Diskstream::Diskstream (Session &sess, const string &name, Flag flag) - : _name (name) - , _session (sess) + : SessionObject(sess, name) { init (flag); } Diskstream::Diskstream (Session& sess, const XMLNode& node) - : _session (sess) + : SessionObject(sess, "unnamed diskstream") { init (Recordable); } @@ -109,6 +108,7 @@ Diskstream::init (Flag f) speed_buffer_size = 0; last_phase = 0; phi = (uint64_t) (0x1000000); + target_phi = phi; file_frame = 0; playback_sample = 0; playback_distance = 0; @@ -120,8 +120,6 @@ Diskstream::init (Flag f) overwrite_frame = 0; overwrite_queued = false; input_change_pending = NoChange; - - _n_channels = 0; } Diskstream::~Diskstream () @@ -192,7 +190,7 @@ Diskstream::realtime_set_speed (double sp, bool global) } _actual_speed = new_speed; - phi = (uint64_t) (0x1000000 * fabs(_actual_speed)); + target_phi = (uint64_t) (0x1000000 * fabs(_actual_speed)); } if (changed) { @@ -261,7 +259,7 @@ Diskstream::set_loop (Location *location) return 0; } -nframes_t +ARDOUR::nframes_t Diskstream::get_capture_start_frame (uint32_t n) { Glib::Mutex::Lock lm (capture_info_lock); @@ -274,7 +272,7 @@ Diskstream::get_capture_start_frame (uint32_t n) } } -nframes_t +ARDOUR::nframes_t Diskstream::get_captured_frames (uint32_t n) { Glib::Mutex::Lock lm (capture_info_lock); @@ -288,7 +286,7 @@ Diskstream::get_captured_frames (uint32_t n) } void -Diskstream::set_roll_delay (nframes_t nframes) +Diskstream::set_roll_delay (ARDOUR::nframes_t nframes) { _roll_delay = nframes; } @@ -379,23 +377,24 @@ Diskstream::playlist_deleted (boost::weak_ptr wpl) } } -int -Diskstream::set_name (string str) +bool +Diskstream::set_name (const string& str) { if (str != _name) { assert(playlist()); playlist()->set_name (str); - _name = str; + + SessionObject::set_name(str); if (!in_set_state && recordable()) { /* rename existing capture files so that they have the correct name */ return rename_write_sources (); } else { - return -1; + return false; } } - return 0; + return true; } void