X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudio_track.cc;h=7f77f637a36bfe413bf370b703e1521283f33915;hb=d89573f8e73ee7f0c28a6b9a8b8ba0f8e78c69aa;hp=070a7453fb1a7212a76890f7135979ece14533b3;hpb=3b20beb8d80e6b0ac12ef17e4f10e1d5dcc9fe55;p=ardour.git diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 070a7453fb..7f77f637a3 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -62,7 +62,7 @@ AudioTrack::create_diskstream () { AudioDiskstream::Flag dflags = AudioDiskstream::Flag (0); - if (_flags & Hidden) { + if (_flags & Auditioner) { dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Hidden); } else { dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Recordable); @@ -96,7 +96,7 @@ AudioTrack::set_diskstream (boost::shared_ptr ds) } _diskstream->set_record_enabled (false); - _diskstream->request_jack_monitors_input (false); + _diskstream->request_input_monitoring (false); DiskstreamChanged (); /* EMIT SIGNAL */ } @@ -313,6 +313,12 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK); if (!lm.locked()) { + boost::shared_ptr diskstream = audio_diskstream(); + framecnt_t playback_distance = diskstream->calculate_playback_distance(nframes); + if (can_internal_playback_seek(std::llabs(playback_distance))) { + /* TODO should declick */ + internal_playback_seek(playback_distance); + } return 0; } @@ -325,6 +331,9 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram if (!_active) { silence (nframes); + if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) { + _meter->reset(); + } return 0; } @@ -350,11 +359,11 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram _silent = false; _amp->apply_gain_automation(false); - BufferSet& bufs = _session.get_scratch_buffers (n_process_buffers ()); + BufferSet& bufs = _session.get_route_buffers (n_process_buffers ()); fill_buffers_with_input (bufs, _input, nframes); - if (_meter_point == MeterInput) { + if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) { _meter->run (bufs, start_frame, end_frame, nframes, true); }