audio: rewrote audio cache to write to contiguous segments rather than one long file

Fixes issues with PCM file placement, optimizes some audio-based timeline
and cache operations, just generally a better approach.
This commit is contained in:
itsmattkc
2020-10-11 23:27:40 +11:00
parent 920a15d2ea
commit f7ab0bb640
17 changed files with 575 additions and 226 deletions
+3 -5
View File
@@ -35,13 +35,11 @@ class AudioOutputDeviceProxy : public QIODevice
{
Q_OBJECT
public:
AudioOutputDeviceProxy() = default;
virtual ~AudioOutputDeviceProxy() override;
AudioOutputDeviceProxy(QObject* parent = nullptr);
void SetParameters(const AudioParams& params);
void SetDevice(const QString &filename, qint64 offset, int playback_speed);
void SetDevice(QIODevice *device, qint64 offset, int playback_speed);
virtual void close() override;
@@ -53,7 +51,7 @@ protected:
private:
qint64 ReverseAwareRead(char* data, qint64 maxlen);
QFile file_;
QIODevice* device_;
TempoProcessor tempo_processor_;