]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/sndoss.h
redefined TRUE and FALSE to be of type bool
[wxWidgets.git] / contrib / include / wx / mmedia / sndoss.h
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/defs.h"
16 #include "wx/string.h"
17 #include "wx/mmedia/sndbase.h"
18 #include "wx/mmedia/sndpcm.h"
19
20 //
21 // OSS output class
22 //
23
24 class WXDLLEXPORT wxSoundStreamOSS : public wxSoundStream {
25 public:
26 wxSoundStreamOSS(const wxString& dev_name = wxT("/dev/dsp"));
27 ~wxSoundStreamOSS();
28
29 wxSoundStream& Read(void *buffer, wxUint32 len);
30 wxSoundStream& Write(const void *buffer, wxUint32 len);
31 wxUint32 GetBestSize() const;
32
33 bool SetSoundFormat(const wxSoundFormatBase& format);
34
35 bool StartProduction(int evt);
36 bool StopProduction();
37
38 bool QueueFilled() const;
39
40 // You should not call this.
41 void WakeUpEvt(int evt);
42 protected:
43 // OSS device
44 int m_fd;
45 wxUint32 m_bufsize;
46 int m_tag;
47 bool m_oss_stop, m_oss_ok, m_q_filled;
48 wxString m_devname;
49
50 private:
51 bool SetupFormat(wxSoundFormatPcm *pcm);
52 void DetectBest(wxSoundFormatPcm *pcm);
53 };
54
55 #endif