diff options
Diffstat (limited to 'src/lib/hd24sndfile.h')
-rw-r--r-- | src/lib/hd24sndfile.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/lib/hd24sndfile.h b/src/lib/hd24sndfile.h new file mode 100644 index 0000000..bd31145 --- /dev/null +++ b/src/lib/hd24sndfile.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef __hd24sndfile_h__ | ||
2 | #define __hd24sndfile_h__ | ||
3 | class SoundFileWrapper; | ||
4 | #include <config.h> | ||
5 | #include <fstream> | ||
6 | using std::ofstream; | ||
7 | #include <sharedlibs.h> | ||
8 | #include <sndfile.h> | ||
9 | |||
10 | class hd24sndfile | ||
11 | { | ||
12 | private: | ||
13 | |||
14 | SF_INFO* sfinfo; | ||
15 | int _handletype; | ||
16 | SoundFileWrapper* soundfile; /* runtime loading wrapper for libsndfile */ | ||
17 | int sf_format; | ||
18 | public: | ||
19 | SNDFILE* sndfilehandle; | ||
20 | ofstream *outfilehandle; | ||
21 | |||
22 | hd24sndfile(int p_format,SoundFileWrapper* p_soundfile); | ||
23 | ~hd24sndfile(); | ||
24 | int handletype(); | ||
25 | void* handle(); | ||
26 | void handle(SNDFILE* newhandle); | ||
27 | void handle(ofstream* newhandle); | ||
28 | void handle(void* newhandle,int htype); | ||
29 | void open(const char* filename,int filemode,SF_INFO* infoblock, | ||
30 | SoundFileWrapper* _soundfile); | ||
31 | void open(const char* filename,int filemode,SF_INFO* infoblock); | ||
32 | void writerawbuf(unsigned char* buf,__uint32 subblockbytes); | ||
33 | void close(); | ||
34 | void write_float(float* buf,__uint32 frames); | ||
35 | }; | ||
36 | |||
37 | #endif | ||