1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // License: wxWindows license
8 // --------------------------------------------------------------------------
13 #pragma interface "sndoss.h"
17 #include "wx/string.h"
18 #include "wx/mmedia/defs.h"
19 #include "wx/mmedia/sndbase.h"
20 #include "wx/mmedia/sndpcm.h"
26 class WXDLLIMPEXP_MMEDIA wxSoundStreamOSS
: public wxSoundStream
{
28 wxSoundStreamOSS(const wxString
& dev_name
= wxT("/dev/dsp"));
31 wxSoundStream
& Read(void *buffer
, wxUint32 len
);
32 wxSoundStream
& Write(const void *buffer
, wxUint32 len
);
33 wxUint32
GetBestSize() const;
35 bool SetSoundFormat(const wxSoundFormatBase
& format
);
37 bool StartProduction(int evt
);
38 bool StopProduction();
40 bool QueueFilled() const;
42 // You should not call this.
43 void WakeUpEvt(int evt
);
49 bool m_oss_stop
, m_oss_ok
, m_q_filled
;
53 bool SetupFormat(wxSoundFormatPcm
*pcm
);
54 void DetectBest(wxSoundFormatPcm
*pcm
);