Applied #10362: wxMac's wxSound doesn't work

By Cyball


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2009-09-28 08:12:24 +00:00
parent 1a956a9823
commit d8813f69c8
3 changed files with 75 additions and 161 deletions

View File

@@ -21,20 +21,23 @@ class WXDLLEXPORT wxSound : public wxSoundBase
{
public:
wxSound();
wxSound(const wxString& fileName, bool isResource = FALSE);
wxSound(const wxString& fileName, bool isResource = false);
wxSound(int size, const wxByte* data);
virtual ~wxSound();
public:
bool Create(const wxString& fileName, bool isResource = FALSE);
bool IsOk() const { return !m_sndname.IsEmpty(); }
bool Create(const wxString& fileName, bool isResource = false);
bool IsOk() const { return !m_sndname.IsEmpty() || m_hSnd; }
static void Stop();
static bool IsPlaying();
void* GetHandle();
protected:
bool DoPlay(unsigned flags) const;
public:
#if wxABI_VERSION >= 20811
bool Create(int size, const wxByte* data);
#endif
private:
wxString m_sndname; //file path
char* m_hSnd; //pointer to resource or memory location