# HG changeset patch # User Ritor1 # Date 1412262987 -21600 # Node ID b96f6cb1855d8f7e5784fd75b4a3e87ec62287df # Parent 16bae6fd06e15de2c280599e0be2bc09cdf94927 LPWSTR wStr = new WCHAR[255] diff -r 16bae6fd06e1 -r b96f6cb1855d GUI/UI/UIHouses.cpp --- a/GUI/UI/UIHouses.cpp Thu Oct 02 19:40:13 2014 +0600 +++ b/GUI/UI/UIHouses.cpp Thu Oct 02 21:16:27 2014 +0600 @@ -987,8 +987,8 @@ //----- (004B1E92) -------------------------------------------------------- void PlayHouseSound(unsigned int uHouseID, HouseSoundID sound) { - if ( pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId ) - pAudioPlayer->PlaySound((SoundID)(sound + 100 * (pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId + 300)), + if ( pAnimatedRooms[p2DEvents[uHouseID].uAnimationID].uRoomSoundId ) + pAudioPlayer->PlaySound((SoundID)(sound + 100 * (pAnimatedRooms[p2DEvents[uHouseID].uAnimationID].uRoomSoundId + 300)), 806, 0, -1, 0, 0, 0, 0); } diff -r 16bae6fd06e1 -r b96f6cb1855d Media/Audio/AudioPlayer.cpp --- a/Media/Audio/AudioPlayer.cpp Thu Oct 02 19:40:13 2014 +0600 +++ b/Media/Audio/AudioPlayer.cpp Thu Oct 02 21:16:27 2014 +0600 @@ -440,7 +440,6 @@ void AudioPlayer::PlayMusicTrack(MusicID eTrack) { char string[256]; - wchar_t *wStr = new wchar_t; if (!bNoSound && bPlayerReady && uMusicVolimeMultiplier) { if ( use_music_folder ) @@ -452,8 +451,11 @@ Log::Warning(L"File 14.mp3 in Music\\ folder not found"); return; } + LPWSTR wStr = new WCHAR[255]; + //wchar_t *wStr = new wchar_t; char2wchar_t(string,wStr); PlayAudio(wStr); + delete []wStr; alSourcef (mSourceID, AL_GAIN, pSoundVolumeLevels[uMusicVolimeMultiplier]); } else if ( hAILRedbook )