]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/sound.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSound class (loads and plays short Windows .wav files).
4 // Optional on non-Windows platforms.
5 // Author: Ryan Norton, Stefan Csomor
9 // Copyright: (c) Ryan Norton, Stefan Csomor
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
16 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17 #pragma interface "sound.h"
22 #include "wx/object.h"
24 class WXDLLEXPORT wxSound
: public wxSoundBase
28 wxSound(const wxString
& fileName
, bool isResource
= FALSE
);
29 wxSound(int size
, const wxByte
* data
);
33 bool Create(const wxString
& fileName
, bool isResource
= FALSE
);
34 bool IsOk() const { return !m_sndname
.IsEmpty(); }
36 static bool IsPlaying();
40 bool DoPlay(unsigned flags
) const;
43 wxString m_sndname
; //file path
44 char* m_hSnd
; //pointer to resource or memory location
45 int m_waveLength
; //size of file in memory mode
46 void* m_pTimer
; //timer