]>
Commit | Line | Data |
---|---|---|
e8482f24 GL |
1 | // -------------------------------------------------------------------------- |
2 | // Name: sndesd.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_SNDESD_H | |
10 | #define _WX_SNDESD_H | |
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma interface "sndesd.h" | |
14 | #endif | |
15 | ||
16 | #include "wx/defs.h" | |
17 | #include "wx/string.h" | |
15e8daec | 18 | #include "wx/mmedia/defs.h" |
e8482f24 GL |
19 | #include "wx/mmedia/sndbase.h" |
20 | #include "wx/mmedia/sndpcm.h" | |
21 | ||
22 | // | |
23 | // ESD output class | |
24 | // | |
25 | ||
26 | class wxSoundStreamESD : public wxSoundStream { | |
27 | public: | |
28 | wxSoundStreamESD(const wxString& hostname = wxT("localhost")); | |
29 | ~wxSoundStreamESD(); | |
30 | ||
31 | wxSoundStream& Read(void *buffer, wxUint32 len); | |
32 | wxSoundStream& Write(const void *buffer, wxUint32 len); | |
33 | ||
34 | bool SetSoundFormat(const wxSoundFormatBase& format); | |
35 | ||
36 | bool StartProduction(int evt); | |
37 | bool StopProduction(); | |
38 | ||
39 | // You should not call this. | |
40 | void WakeUpEvt(int evt); | |
41 | ||
42 | bool QueueFilled() const { return m_q_filled; } | |
43 | protected: | |
44 | int m_fd_input, m_fd_output; // ESD fds | |
45 | int m_tag_input, m_tag_output; // GLIB tags | |
46 | bool m_esd_stop; // Stream started ? | |
47 | bool m_esd_ok; // ESD detected | |
48 | wxString m_hostname; // ESD host | |
49 | bool m_q_filled; // queue filled | |
50 | ||
51 | private: | |
52 | void DetectBest(wxSoundFormatPcm *pcm); | |
53 | }; | |
54 | ||
55 | #endif |