]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/sound.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSound class (loads and plays short Windows .wav files).
4 // Optional on non-Windows platforms.
9 // Copyright: (c) Ryan Norton
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_COCOA_SOUND_H_
14 #define _WX_COCOA_SOUND_H_
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_hSnd
!= NULL
; }
36 static bool IsPlaying();
38 inline WX_NSSound
GetNSSound()
41 bool DoPlay(unsigned flags
) const;
44 WX_NSSound m_hSnd
; //NSSound handle
45 wxString m_sndname
; //file path
46 int m_waveLength
; //size of file in memory mode
47 struct objc_object
* m_cocoaSoundDelegate
;