viewer: force valid sample type

Fixes #2183
This commit is contained in:
itsmattkc
2023-02-27 18:12:13 -08:00
parent 3bc53cef60
commit 82454c09c9
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -625,9 +625,12 @@ RenderTicketPtr PreviewAutoCacher::RenderAudio(Node *node, ViewerOutput *context
connect(watcher, &RenderTicketWatcher::Finished, this, &PreviewAutoCacher::AudioRendered);
running_audio_tasks_.append(watcher);
AudioParams p = context->GetAudioParams();
p.set_format(ViewerOutput::kDefaultSampleFormat);
RenderManager::RenderAudioParams rap(node,
r,
context->GetAudioParams(),
p,
RenderMode::kOffline);
rap.generate_waveforms = dynamic_cast<AudioWaveformCache*>(cache);
+2
View File
@@ -510,6 +510,8 @@ void ViewerWidget::UpdateAudioProcessor()
CloseAudioProcessor();
AudioParams ap = GetConnectedNode()->GetAudioParams();
ap.set_format(ViewerOutput::kDefaultSampleFormat);
AudioParams packed(OLIVE_CONFIG("AudioOutputSampleRate").toInt(),
OLIVE_CONFIG("AudioOutputChannelLayout").toULongLong(),
SampleFormat::from_string(OLIVE_CONFIG("AudioOutputSampleFormat").toString().toStdString()));