]>
Commit | Line | Data |
---|---|---|
526ddb13 GL |
1 | // -------------------------------------------------------------------------- |
2 | // Name: sndwav.h | |
3 | // Purpose: | |
4 | // Date: 08/11/1999 | |
5 | // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999 | |
6 | // CVSID: $Id$ | |
7 | // -------------------------------------------------------------------------- | |
8 | #ifndef _WX_SNDWAV_H | |
9 | #define _WX_SNDWAV_H | |
10 | ||
11 | #ifdef __GNUG__ | |
12 | #pragma interface "sndwav.h" | |
13 | #endif | |
14 | ||
0662cd32 | 15 | #include <wx/defs.h> |
526ddb13 | 16 | #include <wx/stream.h> |
0662cd32 | 17 | #include <wx/datstrm.h> |
526ddb13 GL |
18 | #include "sndbase.h" |
19 | #include "sndcodec.h" | |
20 | #include "sndfile.h" | |
21 | ||
22 | // | |
23 | // WAVE codec | |
24 | // | |
25 | ||
26 | class wxSoundWave: public wxSoundFileStream { | |
794bcc2d | 27 | public: |
2018e574 GL |
28 | wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound); |
29 | wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound); | |
30 | ~wxSoundWave(); | |
31 | ||
32 | bool CanRead(); | |
33 | wxString GetCodecName() const; | |
34 | ||
794bcc2d | 35 | protected: |
2018e574 | 36 | bool PrepareToPlay(); |
794bcc2d | 37 | bool PrepareToRecord(wxUint32 time); |
2018e574 | 38 | bool FinishRecording(); |
794bcc2d | 39 | bool RepositionStream(wxUint32 position); |
2018e574 GL |
40 | |
41 | wxUint32 GetData(void *buffer, wxUint32 len); | |
42 | wxUint32 PutData(const void *buffer, wxUint32 len); | |
43 | ||
44 | bool HandleOutputPCM(wxDataInputStream& data, wxUint16 channels, | |
45 | wxUint32 sample_fq, wxUint32 byte_p_sec, | |
46 | wxUint16 byte_p_spl, wxUint16 bits_p_spl); | |
47 | bool HandleOutputG721(wxDataInputStream& data, wxUint16 channels, | |
48 | wxUint32 sample_fq, wxUint32 byte_p_sec, | |
49 | wxUint16 byte_p_spl, wxUint16 bits_p_spl); | |
50 | wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data); | |
51 | wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data); | |
794bcc2d GL |
52 | |
53 | protected: | |
54 | off_t m_base_offset; | |
526ddb13 GL |
55 | }; |
56 | ||
57 | #endif |