Mesen/Core/WaveRecorder.h

21 lines
422 B
C
Raw Normal View History

#include "stdafx.h"
class WaveRecorder
{
private:
std::ofstream _stream;
uint32_t _streamSize;
uint32_t _sampleRate;
bool _isStereo;
string _outputFile;
void WriteHeader();
void UpdateSizeValues();
void CloseFile();
public:
WaveRecorder(string outputFile, uint32_t sampleRate, bool isStereo);
~WaveRecorder();
bool WriteSamples(int16_t* samples, uint32_t sampleCount, uint32_t sampleRate, bool isStereo);
};