along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: diskstream.cc 567 2006-06-07 14:54:12Z trutkin $
*/
#include <fstream>
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;
Diskstream::~Diskstream ()
{
- // Taken by derived class destrctors.. should assure locked here somehow?
- //Glib::Mutex::Lock lm (state_lock);
-
if (_playlist)
_playlist->release ();
}
void
Diskstream::non_realtime_set_speed ()
{
- if (_buffer_reallocation_required)
- {
+ if (_buffer_reallocation_required) {
Glib::Mutex::Lock lm (state_lock);
allocate_temporary_buffers ();
}
_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;
}