wxMac Unicode support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user