X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fdiskstream.cc;h=18aeb329310bd7b739fb9e0862e7811b12fb2c5b;hb=c7e404a1c0ee9af941a335e4bdd2f667b0c6317a;hp=812709cda13670e8cffaa9d6e5e97e3b6c730c48;hpb=a1960ba3c0c751e9f5fef4ccae70c46ae713c7cb;p=ardour.git diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index 812709cda1..18aeb32931 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -61,7 +61,7 @@ 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; @@ -114,20 +114,16 @@ Diskstream::init (Flag f) 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 (); } @@ -217,7 +213,9 @@ Diskstream::prepare () void Diskstream::recover () { - state_lock.unlock(); + if (commit_should_unlock) { + state_lock.unlock(); + } _processed = false; } @@ -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; }