correctly affect speed/reversing when shuttling audio

This commit is contained in:
itsmattkc
2020-01-07 16:41:30 +11:00
parent c938055293
commit a616aaa182
11 changed files with 433 additions and 27 deletions
+13 -1
View File
@@ -3,13 +3,17 @@
#include <QIODevice>
#include "tempoprocessor.h"
class AudioOutputDeviceProxy : public QIODevice
{
Q_OBJECT
public:
AudioOutputDeviceProxy();
void SetDevice(QIODevice* device);
void SetParameters(const AudioRenderingParams& params);
void SetDevice(QIODevice* device, int playback_speed);
void SetSendAverages(bool send);
@@ -24,10 +28,18 @@ protected:
virtual qint64 writeData(const char *data, qint64 maxSize) override;
private:
qint64 ReverseAwareRead(char* data, qint64 maxlen);
QIODevice* device_;
TempoProcessor tempo_processor_;
bool send_averages_;
AudioRenderingParams params_;
int playback_speed_;
};
#endif // AUDIOOUTPUTDEVICEPROXY_H