X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e40298d54ecd5b109222a7c60aa2ef084a304d69..5b5ea4664162471bb709cf6addaba92936ccd36a:/src/mac/wave.cpp diff --git a/src/mac/wave.cpp b/src/mac/wave.cpp index 0c5aac8bfc..35accb9167 100644 --- a/src/mac/wave.cpp +++ b/src/mac/wave.cpp @@ -135,23 +135,18 @@ bool wxWave::Create(const wxString& fileName, bool isResource) //don't know what to do with looped, wth bool wxWave::Play(bool async, bool looped) const { - char lpSnd[32]; bool ret = false; if (m_isResource) { -#if TARGET_CARBON - c2pstrcpy((unsigned char *)lpSnd, m_sndname); -#else - strcpy(lpSnd, m_sndname); - c2pstr((char *) lpSnd); -#endif - SndListHandle hSnd; + Str255 snd ; + wxMacStringToPascal( m_sndname , snd ) ; + SndListHandle hSnd; - hSnd = (SndListHandle) GetNamedResource('snd ',(const unsigned char *) lpSnd); + hSnd = (SndListHandle) GetNamedResource('snd ', snd); - if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, async) == noErr)) - ret = true; + if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, async) == noErr)) + ret = true; } return ret;