]>
Commit | Line | Data |
---|---|---|
e8482f24 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$ | |
05aa8cf3 | 7 | // License: wxWindows license |
e8482f24 GL |
8 | // -------------------------------------------------------------------------- |
9 | #ifndef _WX_SNDOSS_H | |
10 | #define _WX_SNDOSS_H | |
11 | ||
e8482f24 GL |
12 | #include "wx/defs.h" |
13 | #include "wx/string.h" | |
15e8daec | 14 | #include "wx/mmedia/defs.h" |
e8482f24 GL |
15 | #include "wx/mmedia/sndbase.h" |
16 | #include "wx/mmedia/sndpcm.h" | |
17 | ||
18 | // | |
19 | // OSS output class | |
20 | // | |
21 | ||
15e8daec | 22 | class WXDLLIMPEXP_MMEDIA wxSoundStreamOSS : public wxSoundStream { |
e8482f24 GL |
23 | public: |
24 | wxSoundStreamOSS(const wxString& dev_name = wxT("/dev/dsp")); | |
25 | ~wxSoundStreamOSS(); | |
26 | ||
27 | wxSoundStream& Read(void *buffer, wxUint32 len); | |
28 | wxSoundStream& Write(const void *buffer, wxUint32 len); | |
29 | wxUint32 GetBestSize() const; | |
30 | ||
31 | bool SetSoundFormat(const wxSoundFormatBase& format); | |
32 | ||
33 | bool StartProduction(int evt); | |
34 | bool StopProduction(); | |
35 | ||
36 | bool QueueFilled() const; | |
37 | ||
38 | // You should not call this. | |
39 | void WakeUpEvt(int evt); | |
40 | protected: | |
41 | // OSS device | |
42 | int m_fd; | |
43 | wxUint32 m_bufsize; | |
44 | int m_tag; | |
45 | bool m_oss_stop, m_oss_ok, m_q_filled; | |
46 | wxString m_devname; | |
47 | ||
48 | private: | |
49 | bool SetupFormat(wxSoundFormatPcm *pcm); | |
50 | void DetectBest(wxSoundFormatPcm *pcm); | |
51 | }; | |
52 | ||
53 | #endif |