]>
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 | ||
0662cd32 GL |
28 | wxSoundStream& Read(void *buffer, wxUint32 len); |
29 | wxSoundStream& Write(const void *buffer, wxUint32 len); | |
526ddb13 GL |
30 | wxUint32 GetBestSize() const; |
31 | ||
32 | bool SetSoundFormat(const wxSoundFormatBase& format); | |
33 | ||
34 | bool StartProduction(int evt); | |
35 | bool StopProduction(); | |
36 | ||
503aa33d | 37 | bool QueueFilled() const; |
526ddb13 GL |
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; | |
503aa33d | 45 | bool m_oss_stop, m_q_filled; |
526ddb13 GL |
46 | wxString m_devname; |
47 | ||
48 | private: | |
49 | bool SetupFormat(wxSoundFormatPcm *pcm); | |
50 | void DetectBest(wxSoundFormatPcm *pcm); | |
51 | }; | |
52 | ||
53 | #endif |