]>
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"
15 // ---------------------------------------------------------------------------
17 // ---------------------------------------------------------------------------
19 wxSoundFormatBase::wxSoundFormatBase()
23 wxSoundFormatBase::~wxSoundFormatBase()
27 wxSoundFormatBase
*wxSoundFormatBase::Clone() const
32 bool wxSoundFormatBase::operator!=(const wxSoundFormatBase
& frmt2
) const
34 return (GetType() != frmt2
.GetType());
37 // ---------------------------------------------------------------------------
39 // ---------------------------------------------------------------------------
41 wxSoundStream::wxSoundStream()
47 m_snderror
= wxSOUND_NOERR
;
53 wxSoundStream::~wxSoundStream()
59 // SetSoundFormat returns TRUE when the format can be handled.
60 bool wxSoundStream::SetSoundFormat(const wxSoundFormatBase
& format
)
65 m_sndformat
= format
.Clone();
69 // Register a callback for a specified async event.
70 void wxSoundStream::Register(int evt
, wxSoundCallback cbk
, char *cdata
)
88 void wxSoundStream::OnSoundEvent(int evt
)
93 m_handler
->OnSoundEvent(evt
);
108 m_callback
[c
](this, evt
, m_cdata
[c
]);