X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03e11df5470fd64d9d9a669d0b50b84c2d714736..61cca9d24ee3f935f2581e3cfb894e46181290e6:/src/mac/carbon/wave.cpp diff --git a/src/mac/carbon/wave.cpp b/src/mac/carbon/wave.cpp index ac2dcac7e0..f0891a6546 100644 --- a/src/mac/carbon/wave.cpp +++ b/src/mac/carbon/wave.cpp @@ -126,14 +126,18 @@ bool wxWave::Play(bool async, bool looped) const if (m_isResource) { - strcpy(lpSnd, m_sndname); - c2pstr((char *) lpSnd); - SndListHandle hSnd; - - hSnd = (SndListHandle) GetNamedResource('snd ',(const unsigned char *) lpSnd); +#if TARGET_CARBON + c2pstrcpy((unsigned char *)lpSnd, m_sndname); +#else + strcpy(lpSnd, m_sndname); + c2pstr((char *) lpSnd); +#endif + SndListHandle hSnd; + + hSnd = (SndListHandle) GetNamedResource('snd ',(const unsigned char *) lpSnd); - if ((hSnd != NULL) && (SndPlay(m_sndChan, hSnd, async) == noErr)) - ret = true; + if ((hSnd != NULL) && (SndPlay(m_sndChan, hSnd, async) == noErr)) + ret = true; } return ret;