mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-23 17:19:39 +00:00
21 lines
422 B
C++
21 lines
422 B
C++
#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);
|
|
}; |