renderer/viewer: fixed playback and live updates from value changes

This commit is contained in:
itsmattkc
2020-05-15 15:02:30 +10:00
parent 8795e51452
commit 2039067fdc
17 changed files with 146 additions and 148 deletions
+9
View File
@@ -21,6 +21,7 @@
#include "audioplaybackcache.h"
#include <QDir>
#include <QFile>
#include <QRandomGenerator>
#include "common/filefunctions.h"
@@ -42,6 +43,14 @@ void AudioPlaybackCache::SetParameters(const AudioRenderingParams &params)
return;
}
params_ = params;
// Restart empty file so there's always "something" to play
QFile f(filename_);
if (f.open(QFile::WriteOnly)) {
f.close();
}
// Our current audio cache is unusable, so we truncate it automatically
InvalidateAll();