Mercurial > mm7
changeset 2515:b96f6cb1855d
LPWSTR wStr = new WCHAR[255]
author | Ritor1 |
---|---|
date | Thu, 02 Oct 2014 21:16:27 +0600 |
parents | 16bae6fd06e1 |
children | 56b6d74ce716 |
files | GUI/UI/UIHouses.cpp Media/Audio/AudioPlayer.cpp |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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); }
--- 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 )