renderer/viewer: fixed playback and live updates from value changes
This commit is contained in:
@@ -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 ¶ms)
|
||||
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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user