Change ALSA device default to 'default' from hw:0
[zynaddsubfx-code.git] / src / Misc / WavFile.h
blobe3c873dfda2a6df97a4767707d809e3246d1d0f6
1 /*
2 ZynAddSubFX - a software synthesizer
4 WavFile.h - Records sound to a file
5 Copyright (C) 2008 Nasca Octavian Paul
6 Author: Nasca Octavian Paul
7 Mark McCurry
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
15 #ifndef WAVFILE_H
16 #define WAVFILE_H
17 #include <string>
19 namespace zyn {
21 class WavFile
23 public:
24 WavFile(std::string filename, int samplerate, int channels);
25 ~WavFile();
27 bool good() const;
29 void writeMonoSamples(int nsmps, short int *smps);
30 void writeStereoSamples(int nsmps, short int *smps);
32 private:
33 int sampleswritten;
34 int samplerate;
35 int channels;
36 FILE *file;
41 #endif