]>
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$ | |
7 | // -------------------------------------------------------------------------- | |
8 | #ifndef _WX_SNDESD_H | |
9 | #define _WX_SNDESD_H | |
10 | ||
11 | #ifdef __GNUG__ | |
12 | #pragma interface "sndesd.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 | // ESD output class | |
22 | // | |
23 | ||
24 | class wxSoundStreamESD : public wxSoundStream { | |
25 | public: | |
26 | wxSoundStreamESD(const wxString& hostname = wxT("localhost")); | |
27 | ~wxSoundStreamESD(); | |
28 | ||
29 | wxSoundStream& Read(void *buffer, wxUint32 len); | |
30 | wxSoundStream& Write(const void *buffer, wxUint32 len); | |
31 | ||
32 | bool SetSoundFormat(const wxSoundFormatBase& format); | |
33 | ||
34 | bool StartProduction(int evt); | |
35 | bool StopProduction(); | |
36 | ||
37 | // You should not call this. | |
38 | void WakeUpEvt(int evt); | |
39 | ||
40 | bool QueueFilled() const { return m_q_filled; } | |
41 | protected: | |
42 | int m_fd_input, m_fd_output; // ESD fds | |
43 | int m_tag_input, m_tag_output; // GLIB tags | |
44 | bool m_esd_stop; // Stream started ? | |
45 | bool m_esd_ok; // ESD detected | |
46 | wxString m_hostname; // ESD host | |
47 | bool m_q_filled; // queue filled | |
48 | ||
49 | private: | |
50 | void DetectBest(wxSoundFormatPcm *pcm); | |
51 | }; | |
52 | ||
53 | #endif |