]>
Commit | Line | Data |
---|---|---|
526ddb13 GL |
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) {} | |
503aa33d | 38 | bool QueueFilled() const; |
526ddb13 GL |
39 | |
40 | // You should not call this. | |
41 | void WakeUpEvt(int evt); | |
42 | protected: | |
43 | int m_fd; | |
44 | wxUint32 m_bufsize; | |
45 | int m_tag; | |
503aa33d | 46 | bool m_oss_stop, m_q_filled; |
526ddb13 GL |
47 | wxString m_devname; |
48 | ||
49 | private: | |
50 | bool SetupFormat(wxSoundFormatPcm *pcm); | |
51 | void DetectBest(wxSoundFormatPcm *pcm); | |
52 | }; | |
53 | ||
54 | #endif |