summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-10-12 02:11:14 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-10-12 02:11:14 +0000
commit40d8d9678552c17ff28d4f71411754013006dc45 (patch)
tree0b525192b9461245de8d3c763c3d9f8ed6f63398
parent29f0d9732eb68fcaa22219cedddddd47bcaa8c17 (diff)
fixes for varispeed playback, mackie control compilation, new odd color for treeview rows
git-svn-id: svn://localhost/ardour2/trunk@2544 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour2_ui_dark.rc.in2
-rw-r--r--libs/ardour/ardour/diskstream.h1
-rw-r--r--libs/ardour/audio_diskstream.cc13
-rw-r--r--libs/ardour/diskstream.cc3
-rw-r--r--libs/surfaces/mackie/surface_port.cc3
5 files changed, 15 insertions, 7 deletions
diff --git a/gtk2_ardour/ardour2_ui_dark.rc.in b/gtk2_ardour/ardour2_ui_dark.rc.in
index 4ee90ddd30..50650d7f34 100644
--- a/gtk2_ardour/ardour2_ui_dark.rc.in
+++ b/gtk2_ardour/ardour2_ui_dark.rc.in
@@ -91,7 +91,7 @@ style "default_base" = "medium_text"
GtkTreeView::vertical-padding = 0
GtkTreeView::horizontal-padding = 0
GtkTreeView::even-row-color = { 0, 0, 0 }
- GtkTreeView::odd-row-color = { 0.06, 0.06, 0.10 }
+ GtkTreeView::odd-row-color = { 0.10, 0.10, 0.15 }
fg[NORMAL] = { 0.80, 0.80, 0.80 }
fg[ACTIVE] = { 0.80, 0.80, 0.80 }
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h
index 2a5c94dd68..824d864663 100644
--- a/libs/ardour/ardour/diskstream.h
+++ b/libs/ardour/ardour/diskstream.h
@@ -276,6 +276,7 @@ class Diskstream : public SessionObject
uint64_t last_phase;
uint64_t phi;
+ uint64_t target_phi;
nframes_t file_frame;
nframes_t playback_sample;
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 7d95b78706..fbe12e6bf5 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -766,11 +766,18 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
if (rec_nframes == 0 && _actual_speed != 1.0f && _actual_speed != -1.0f) {
uint64_t phase = last_phase;
+ int64_t phi_delta;
nframes_t i = 0;
// Linearly interpolate into the alt buffer
// using 40.24 fixp maths (swh)
+ if (phi != target_phi) {
+ phi_delta = ((int64_t)(target_phi - phi)) / nframes;
+ } else {
+ phi_delta = 0;
+ }
+
for (chan = c->begin(); chan != c->end(); ++chan) {
float fr;
@@ -785,19 +792,21 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
chaninfo->speed_buffer[outsample] =
chaninfo->current_playback_buffer[i] * (1.0f - fr) +
chaninfo->current_playback_buffer[i+1] * fr;
- phase += phi;
+ phase += phi + phi_delta;
}
chaninfo->current_playback_buffer = chaninfo->speed_buffer;
}
- playback_distance = i + 1;
+ playback_distance = i; // + 1;
last_phase = (phase & 0xFFFFFF);
} else {
playback_distance = nframes;
}
+ phi = target_phi;
+
}
ret = 0;
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index 8de2faeb15..cc683c2450 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -108,6 +108,7 @@ Diskstream::init (Flag f)
speed_buffer_size = 0;
last_phase = 0;
phi = (uint64_t) (0x1000000);
+ target_phi = phi;
file_frame = 0;
playback_sample = 0;
playback_distance = 0;
@@ -189,7 +190,7 @@ Diskstream::realtime_set_speed (double sp, bool global)
}
_actual_speed = new_speed;
- phi = (uint64_t) (0x1000000 * fabs(_actual_speed));
+ target_phi = (uint64_t) (0x1000000 * fabs(_actual_speed));
}
if (changed) {
diff --git a/libs/surfaces/mackie/surface_port.cc b/libs/surfaces/mackie/surface_port.cc
index 8aa1be7fe9..faf4781840 100644
--- a/libs/surfaces/mackie/surface_port.cc
+++ b/libs/surfaces/mackie/surface_port.cc
@@ -160,8 +160,6 @@ ostream & operator << ( ostream & os, const MIDI::Port & port )
os << "; ";
os << "ok: " << port.ok();
os << "; ";
- os << "number: " << port.number();
- os << "; ";
return os;
}
@@ -172,7 +170,6 @@ ostream & Mackie::operator << ( ostream & os, const SurfacePort & port )
os << "; ";
os << "name: " << port.port().name();
os << "; ";
- os << "number: " << port.number();
os << " }";
return os;
}