correctly affect speed/reversing when shuttling audio

This commit is contained in:
itsmattkc
2020-01-07 16:41:30 +11:00
parent c938055293
commit a616aaa182
11 changed files with 433 additions and 27 deletions
+7 -2
View File
@@ -70,7 +70,12 @@ void AudioOutputManager::ResetToPushMode()
}
}
void AudioOutputManager::PullFromDevice(QIODevice *device)
void AudioOutputManager::SetParameters(const AudioRenderingParams &params)
{
device_proxy_.SetParameters(params);
}
void AudioOutputManager::PullFromDevice(QIODevice *device, int playback_speed)
{
if (!output_ || !device) {
return;
@@ -82,7 +87,7 @@ void AudioOutputManager::PullFromDevice(QIODevice *device)
pushed_samples_.clear();
// Pull from the device
device_proxy_.SetDevice(device);
device_proxy_.SetDevice(device, playback_speed);
device_proxy_.open(QIODevice::ReadOnly);
output_->start(&device_proxy_);
}