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
This commit is contained in:
Paul Davis
2007-10-12 02:11:14 +00:00
parent 29f0d9732e
commit 40d8d96785
5 changed files with 15 additions and 7 deletions

View File

@@ -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 }

View File

@@ -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;

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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;
}