summaryrefslogtreecommitdiff
path: root/libs/ardour/diskstream.cc
diff options
context:
space:
mode:
authorJesse Chappell <jesse@essej.net>2006-01-06 04:59:17 +0000
committerJesse Chappell <jesse@essej.net>2006-01-06 04:59:17 +0000
commitbd21c474e547d49338ea0efd452895de1e147cd5 (patch)
tree2993bc781777530afc180313c9f69cc898f851e0 /libs/ardour/diskstream.cc
parent18844bac7aa0747453ed4d04c4a462f2044a43bb (diff)
committed RWlock fixes to libardour. added hw monitoring fixes from nick_m. minor alsa midi fix and update rate settings.
git-svn-id: svn://localhost/trunk/ardour2@244 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/diskstream.cc')
-rw-r--r--libs/ardour/diskstream.cc36
1 files changed, 5 insertions, 31 deletions
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index 351fdde33f..d0b0415c8c 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -128,7 +128,6 @@ DiskStream::init (Flag f)
_alignment_style = ExistingMaterial;
_persistent_alignment_style = ExistingMaterial;
first_input_change = true;
- rec_monitoring_off_for_roll = false;
_playlist = 0;
i_am_the_modifier = 0;
atomic_set (&_record_enabled, 0);
@@ -735,16 +734,6 @@ DiskStream::process (jack_nframes_t transport_frame, jack_nframes_t nframes, jac
if (can_record && !_last_capture_regions.empty()) {
_last_capture_regions.clear ();
}
-
- if (rec_nframes) {
-
- if (Config->get_use_hardware_monitoring() && re && rec_monitoring_off_for_roll && rec_monitors_input) {
- for (c = channels.begin(); c != channels.end(); ++c) {
- (*c).source->ensure_monitor_input (true);
- }
- rec_monitoring_off_for_roll = false;
- }
- }
if (nominally_recording || rec_nframes) {
@@ -807,6 +796,7 @@ DiskStream::process (jack_nframes_t transport_frame, jack_nframes_t nframes, jac
} else {
+
/* we can't use the capture buffer as the playback buffer, because
we recorded only a part of the current process' cycle data
for capture.
@@ -1685,24 +1675,6 @@ DiskStream::transport_stopped (struct tm& when, time_t twhen, bool abort_capture
void
DiskStream::finish_capture (bool rec_monitors_input)
{
- if (Config->get_use_hardware_monitoring() && record_enabled()) {
- if (rec_monitors_input) {
- if (rec_monitoring_off_for_roll) {
- for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
- (*chan).source->ensure_monitor_input (true);
- }
- rec_monitoring_off_for_roll = false;
- }
- } else {
- if (!rec_monitoring_off_for_roll) {
- for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
- (*chan).source->ensure_monitor_input (false);
- }
- rec_monitoring_off_for_roll = true;
- }
- }
- }
-
was_recording = false;
if (capture_captured == 0) {
@@ -1732,6 +1704,8 @@ DiskStream::finish_capture (bool rec_monitors_input)
void
DiskStream::set_record_enabled (bool yn, void* src)
{
+ bool rolling = _session.transport_speed() != 0.0f;
+
if (!recordable() || !_session.record_enabling_legal()) {
return;
}
@@ -1765,10 +1739,10 @@ DiskStream::set_record_enabled (bool yn, void* src)
if (yn) {
atomic_set (&_record_enabled, 1);
capturing_sources.clear ();
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_use_hardware_monitoring()) {
for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
if ((*chan).source) {
- (*chan).source->request_monitor_input (true);
+ (*chan).source->request_monitor_input (!(_session.get_auto_input() && rolling));
}
capturing_sources.push_back ((*chan).write_source);
}