This repository has been archived on 2023-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
speex-webrtc-test/src/WavFileWriter.h
2020-11-07 19:58:52 +03:00

26 lines
498 B
C++

#ifndef _WAV_FILE_WRITER_H_
#define _WAV_FILE_WRITER_H_
#include <QtCore>
#include <QtMultimedia>
class WavFileWriter final : public QFile
{
Q_OBJECT
public:
explicit WavFileWriter(const QString& filename,
const QAudioFormat& format,
QObject* parent = nullptr);
~WavFileWriter() override;
bool open();
void close() override;
private:
void writeHeader();
bool hasSupportedFormat();
QAudioFormat format_;
};
#endif // _WAV_FILE_WRITER_H_