]>
Commit | Line | Data |
---|---|---|
1 | // -------------------------------------------------------------------------- | |
2 | // Name: sndoss.h | |
3 | // Purpose: | |
4 | // Date: 08/11/1999 | |
5 | // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999 | |
6 | // CVSID: $Id$ | |
7 | // -------------------------------------------------------------------------- | |
8 | #ifndef _WX_SNDOSS_H | |
9 | #define _WX_SNDOSS_H | |
10 | ||
11 | #ifdef __GNUG__ | |
12 | #pragma interface "sndoss.h" | |
13 | #endif | |
14 | ||
15 | #include <wx/string.h> | |
16 | #include "sndbase.h" | |
17 | #include "sndpcm.h" | |
18 | ||
19 | // | |
20 | // OSS output class | |
21 | // | |
22 | ||
23 | class wxSoundStreamOSS : public wxSoundStream { | |
24 | public: | |
25 | wxSoundStreamOSS(const wxString& dev_name = _T("/dev/dsp")); | |
26 | ~wxSoundStreamOSS(); | |
27 | ||
28 | wxSoundStream& Read(void *buffer, size_t len); | |
29 | wxSoundStream& Write(const void *buffer, size_t len); | |
30 | wxUint32 GetBestSize() const; | |
31 | ||
32 | bool SetSoundFormat(const wxSoundFormatBase& format); | |
33 | ||
34 | bool StartProduction(int evt); | |
35 | bool StopProduction(); | |
36 | ||
37 | void SetDuplexMode(bool duplex) {} | |
38 | ||
39 | // You should not call this. | |
40 | void WakeUpEvt(int evt); | |
41 | protected: | |
42 | int m_fd; | |
43 | wxUint32 m_bufsize; | |
44 | int m_tag; | |
45 | bool m_oss_stop; | |
46 | wxString m_devname; | |
47 | ||
48 | private: | |
49 | bool SetupFormat(wxSoundFormatPcm *pcm); | |
50 | void DetectBest(wxSoundFormatPcm *pcm); | |
51 | }; | |
52 | ||
53 | #endif |