* 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<void> Diskstream::DiskOverrun;
sigc::signal<void> 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);
}
speed_buffer_size = 0;
last_phase = 0;
phi = (uint64_t) (0x1000000);
+ target_phi = phi;
file_frame = 0;
playback_sample = 0;
playback_distance = 0;
_read_data_count = 0;
_write_data_count = 0;
+ commit_should_unlock = false;
pending_overwrite = false;
overwrite_frame = 0;
overwrite_queued = false;
input_change_pending = NoChange;
-
- _n_channels = 0;
}
Diskstream::~Diskstream ()
{
- // Taken by derived class destrctors.. should assure locked here somehow?
- //Glib::Mutex::Lock lm (state_lock);
-
if (_playlist)
_playlist->release ();
}
}
_actual_speed = new_speed;
- phi = (uint64_t) (0x1000000 * fabs(_actual_speed));
+ target_phi = (uint64_t) (0x1000000 * fabs(_actual_speed));
}
if (changed) {
void
Diskstream::recover ()
{
- state_lock.unlock();
+ if (commit_should_unlock) {
+ state_lock.unlock();
+ }
_processed = false;
}
return 0;
}
-nframes_t
+ARDOUR::nframes_t
Diskstream::get_capture_start_frame (uint32_t n)
{
Glib::Mutex::Lock lm (capture_info_lock);
}
}
-nframes_t
+ARDOUR::nframes_t
Diskstream::get_captured_frames (uint32_t n)
{
Glib::Mutex::Lock lm (capture_info_lock);
}
void
-Diskstream::set_roll_delay (nframes_t nframes)
+Diskstream::set_roll_delay (ARDOUR::nframes_t nframes)
{
_roll_delay = nframes;
}
}
}
-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