Renamed m_hSnd to m_cocoaNSSound (match rest of wxCocoa).

Create delegate as a static member shared by all instances.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2004-10-18 22:12:57 +00:00
parent 2841cdd89b
commit a2c1097b8a
2 changed files with 23 additions and 23 deletions

View File

@@ -20,6 +20,7 @@
#if wxUSE_SOUND
#include "wx/object.h"
#include "wx/cocoa/ObjcRef.h"
class WXDLLEXPORT wxSound : public wxSoundBase
{
@@ -31,20 +32,21 @@ public:
public:
bool Create(const wxString& fileName, bool isResource = false);
bool IsOk() const { return m_hSnd != NULL; }
bool IsOk() const
{ return m_cocoaNSSound; }
static void Stop();
static bool IsPlaying();
inline WX_NSSound GetNSSound()
{ return m_hSnd; }
{ return m_cocoaNSSound; }
protected:
bool DoPlay(unsigned flags) const;
private:
WX_NSSound m_hSnd; //NSSound handle
WX_NSSound m_cocoaNSSound; //NSSound handle
wxString m_sndname; //file path
int m_waveLength; //size of file in memory mode
struct objc_object * m_cocoaSoundDelegate;
static const wxObjcAutoRefFromAlloc<struct objc_object *> sm_cocoaDelegate;
};
#endif