1
// Copyright 2013 Dolphin Emulator Project
2
// Licensed under GPLv2
3
// Refer to the license.txt file included.
5
// ---------------------------------------------------------------------------------
6
// Class: WaveFileWriter
7
// Description: Simple utility class to make it easy to write long 16-bit stereo
8
// audio streams to disk.
9
// Use Start() to start recording to a file, and AddStereoSamples to add wave data.
10
// The float variant will convert from -1.0-1.0 range and clamp.
11
// Alternatively, AddSamplesBE for big endian wave data.
12
// If Stop is not called when it destructs, the destructor will call Stop().
13
// ---------------------------------------------------------------------------------
26
void Write(u32 value);
27
void Write4(const char *ptr);
29
WaveFileWriter& operator=(const WaveFileWriter&)/* = delete*/;
35
bool Start(const char *filename, unsigned int HLESampleRate);
38
void SetSkipSilence(bool skip) { skip_silence = skip; }
40
void AddStereoSamples(const short *sample_data, u32 count);
41
void AddStereoSamplesBE(const short *sample_data, u32 count); // big endian
42
u32 GetAudioSize() { return audio_size; }
45
#endif // _WAVEFILE_H_