cache: fixed audio with new system

This commit is contained in:
itsmattkc
2020-05-18 17:16:28 +10:00
parent 127ebbe359
commit 558773538d
7 changed files with 121 additions and 63 deletions
+5 -5
View File
@@ -433,6 +433,11 @@ void ViewerWidget::PlayInternal(int speed, bool in_to_out_only)
playback_speed_ = speed;
play_in_to_out_only_ = in_to_out_only;
int64_t start_time = ruler()->GetTime();
playback_queue_next_frame_ = start_time;
FillPlaybackQueue();
QString audio_fn = GetConnectedNode()->audio_playback_cache()->GetCacheFilename();
if (!audio_fn.isEmpty()) {
AudioManager::instance()->SetOutputParams(GetConnectedNode()->audio_playback_cache()->GetParameters());
@@ -441,11 +446,6 @@ void ViewerWidget::PlayInternal(int speed, bool in_to_out_only)
playback_speed_);
}
int64_t start_time = ruler()->GetTime();
playback_queue_next_frame_ = start_time;
FillPlaybackQueue();
playback_timer_.Start(start_time, playback_speed_, timebase_dbl());
foreach (ViewerWindow* window, windows_) {