]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxMMedia2/lib/sndbase.cpp
1 // --------------------------------------------------------------------------
5 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
7 // --------------------------------------------------------------------------
9 #pragma implementation "sndbase.cpp"
12 #include <wx/wxprec.h>
16 // ---------------------------------------------------------------------------
18 // ---------------------------------------------------------------------------
20 wxSoundFormatBase::wxSoundFormatBase()
24 wxSoundFormatBase::~wxSoundFormatBase()
28 wxSoundFormatBase
*wxSoundFormatBase::Clone() const
33 bool wxSoundFormatBase::operator!=(const wxSoundFormatBase
& frmt2
) const
35 return (GetType() != frmt2
.GetType());
38 // ---------------------------------------------------------------------------
40 // ---------------------------------------------------------------------------
42 wxSoundStream::wxSoundStream()
48 m_snderror
= wxSOUND_NOERR
;
54 wxSoundStream::~wxSoundStream()
60 // SetSoundFormat returns TRUE when the format can be handled.
61 bool wxSoundStream::SetSoundFormat(const wxSoundFormatBase
& format
)
66 m_sndformat
= format
.Clone();
70 // Register a callback for a specified async event.
71 void wxSoundStream::Register(int evt
, wxSoundCallback cbk
, char *cdata
)
89 void wxSoundStream::OnSoundEvent(int evt
)
94 m_handler
->OnSoundEvent(evt
);
109 m_callback
[c
](this, evt
, m_cdata
[c
]);