]> git.saurik.com Git - wxWidgets.git/blame_incremental - contrib/include/wx/mmedia/sndwin.h
added descriptions
[wxWidgets.git] / contrib / include / wx / mmedia / sndwin.h
... / ...
CommitLineData
1// --------------------------------------------------------------------------
2// Name: sndwin.h
3// Purpose:
4// Date: 08/11/1999
5// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
6// CVSID: $Id$
7// --------------------------------------------------------------------------
8#ifndef _WX_SNDWIN_H
9#define _WX_SNDWIN_H
10
11#include "wx/defs.h"
12#include "wx/mmedia/sndbase.h"
13
14typedef struct _wxSoundInternal wxSoundInternal;
15typedef struct _wxSoundInfoHeader wxSoundInfoHeader;
16
17// class WXDLLEXPORT wxSoundInternal;
18class WXDLLEXPORT wxSoundStreamWin : public wxSoundStream {
19 public:
20 wxSoundStreamWin();
21 ~wxSoundStreamWin();
22
23 wxSoundStream& Write(const void *buffer, wxUint32 len);
24 wxSoundStream& Read(void *buffer, wxUint32 len);
25
26 bool SetSoundFormat(wxSoundFormatBase& base);
27
28 bool StartProduction(int evt);
29 bool StopProduction();
30
31 bool QueueFilled() const;
32
33 // Internal but defined as public
34 void NotifyDoneBuffer(wxUint32 dev_handle, int flag);
35
36 wxUint32 GetBestSize() const { return 4096; }
37
38 protected:
39 wxSoundInternal *m_internal;
40 wxUint32 m_current_frag_in, m_current_frag_out;
41 wxUint32 m_input_frag_in, m_output_frag_out;
42 wxSoundInfoHeader **m_headers_play, **m_headers_rec;
43
44 bool m_production_started, m_queue_filled, m_waiting_for;
45
46 protected:
47 void CreateSndWindow();
48 void DestroySndWindow();
49 bool OpenDevice(int mode);
50 void CloseDevice();
51
52 wxSoundInfoHeader *AllocHeader(int mode);
53 void FreeHeader(wxSoundInfoHeader *header, int mode);
54 bool AllocHeaders(int mode);
55 void FreeHeaders(int mode);
56
57 void WaitFor(wxSoundInfoHeader *info);
58 bool AddToQueue(wxSoundInfoHeader *info);
59 void ClearHeader(wxSoundInfoHeader *info);
60
61 wxSoundInfoHeader *NextFragmentOutput();
62 wxSoundInfoHeader *NextFragmentInput();
63};
64
65#endif