use speed value instead of media out value

This functions more or less identically to using a media out value, but the
desired speed is preserved through block length changes, even if the block's
length is reduced to zero (i.e. no rounding errors).
This commit is contained in:
itsmattkc
2020-01-06 15:21:27 +11:00
parent 31b60664a7
commit dae09abf45
12 changed files with 79 additions and 191 deletions
+2 -2
View File
@@ -52,10 +52,10 @@ NodeValueTable AudioRenderWorker::RenderBlock(const TrackOutput *track, const Ti
if (!samples_from_this_block.isEmpty()) {
// Stretch samples here
if (b->media_length() != b->length()) {
if (b->speed() != 1) {
QByteArray speed_adjusted_samples;
double clip_speed = b->speed();
double clip_speed = b->speed().toDouble();
int sample_count = audio_params_.bytes_to_samples(samples_from_this_block.size());