From 756438d4d4cdd35119466d7d3c302f5fc2e314b2 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Thu, 16 Aug 2012 17:18:15 +0000 Subject: [PATCH] -corrected two wrong numbers in sound buffer and video message thread stack --- source/gui/video.cpp | 4 ++-- source/music/SoundDecoder.cpp | 4 ++-- source/music/WavDecoder.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/gui/video.cpp b/source/gui/video.cpp index 5e4fc8a6..3a345e87 100644 --- a/source/gui/video.cpp +++ b/source/gui/video.cpp @@ -592,8 +592,8 @@ void CVideo::waitMessage(const vector &tex, float delay) { m_showWaitMessage = true; if(!waitThreadStack.get()) - waitThreadStack = smartMem2Alloc(8092); - LWP_CreateThread(&waitThread, (void *(*)(void *))CVideo::_showWaitMessages, (void *)this, waitThreadStack.get(), 8092, LWP_PRIO_HIGHEST); + waitThreadStack = smartMem2Alloc(8192); + LWP_CreateThread(&waitThread, (void *(*)(void *))CVideo::_showWaitMessages, (void *)this, waitThreadStack.get(), 8192, LWP_PRIO_HIGHEST); } } diff --git a/source/music/SoundDecoder.cpp b/source/music/SoundDecoder.cpp index f2727564..08f616e8 100644 --- a/source/music/SoundDecoder.cpp +++ b/source/music/SoundDecoder.cpp @@ -62,8 +62,8 @@ SoundDecoder::~SoundDecoder() void SoundDecoder::Init() { SoundType = SOUND_RAW; - SoundBlocks = 8; //Settings.SoundblockCount; - SoundBlockSize = 8092; //Settings.SoundblockSize; + SoundBlocks = 8; + SoundBlockSize = 8192; CurPos = 0; LoopStart = 0; Loop = false; diff --git a/source/music/WavDecoder.cpp b/source/music/WavDecoder.cpp index ef8c0400..33f3ffad 100644 --- a/source/music/WavDecoder.cpp +++ b/source/music/WavDecoder.cpp @@ -131,7 +131,7 @@ void WavDecoder::OpenFile() { file_fd->seek(-8, SEEK_CUR); file_fd->read((u8*)&SmplChunk, sizeof(SWaveSmplChunk)); - SmplChunk.Start = ((le32(SmplChunk.Start) * le16(FmtChunk.channels) * le16(FmtChunk.bps) / 8) + 8091) & ~8091; + SmplChunk.Start = ((le32(SmplChunk.Start) * le16(FmtChunk.channels) * le16(FmtChunk.bps) / 8) + 8191) & ~8191; break; } file_fd->seek(le32(LoopChunk.size), SEEK_CUR);