]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/mmedia/sndoss.h
mark slider as being transparent, otherwise it has ugly solid grey background when...
[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 // License: wxWindows license
8 // --------------------------------------------------------------------------
9 #ifndef _WX_SNDOSS_H
10 #define _WX_SNDOSS_H
11
12 #ifdef __GNUG__
13 #pragma interface "sndoss.h"
14 #endif
15
16 #include "wx/defs.h"
17 #include "wx/string.h"
18 #include "wx/mmedia/defs.h"
19 #include "wx/mmedia/sndbase.h"
20 #include "wx/mmedia/sndpcm.h"
21
22 //
23 // OSS output class
24 //
25
26 class WXDLLIMPEXP_MMEDIA wxSoundStreamOSS : public wxSoundStream {
27 public:
28 wxSoundStreamOSS(const wxString& dev_name = wxT("/dev/dsp"));
29 ~wxSoundStreamOSS();
30
31 wxSoundStream& Read(void *buffer, wxUint32 len);
32 wxSoundStream& Write(const void *buffer, wxUint32 len);
33 wxUint32 GetBestSize() const;
34
35 bool SetSoundFormat(const wxSoundFormatBase& format);
36
37 bool StartProduction(int evt);
38 bool StopProduction();
39
40 bool QueueFilled() const;
41
42 // You should not call this.
43 void WakeUpEvt(int evt);
44 protected:
45 // OSS device
46 int m_fd;
47 wxUint32 m_bufsize;
48 int m_tag;
49 bool m_oss_stop, m_oss_ok, m_q_filled;
50 wxString m_devname;
51
52 private:
53 bool SetupFormat(wxSoundFormatPcm *pcm);
54 void DetectBest(wxSoundFormatPcm *pcm);
55 };
56
57 #endif