solve some bugs

This commit is contained in:
2026-01-05 18:01:13 +08:00
parent 6b64abb1fa
commit 8ed5660faf
17 changed files with 203 additions and 79 deletions
+6 -2
View File
@@ -571,10 +571,14 @@ void ViewerWidget::UpdateAudioProcessor()
CloseAudioProcessor();
AudioParams ap = GetConnectedNode()->GetAudioParams();
if (ap.sample_rate() <= 0 || ap.channel_count() <= 0) {
ap = AudioParams(
OLIVE_CONFIG("DefaultSequenceAudioFrequency").toInt(),
OLIVE_CONFIG("DefaultSequenceAudioLayout").toULongLong(),
ViewerOutput::kDefaultSampleFormat);
}
ap.set_format(ViewerOutput::kDefaultSampleFormat);
uint64_t layout =
OLIVE_CONFIG("AudioOutputChannelLayout").toULongLong();
AudioParams packed(
OLIVE_CONFIG("AudioOutputSampleRate").toInt(),
OLIVE_CONFIG("AudioOutputChannelLayout").toULongLong(),