From 566f849b1dc190bdd89a88516616406b18cd20e8 Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 11 May 2009 23:28:41 +0000 Subject: [PATCH] --- src/hardware/mixer.cpp | 18 ++++++++++-------- src/platform/wii/wiihardware.h | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/hardware/mixer.cpp b/src/hardware/mixer.cpp index 7145552..5e8476d 100644 --- a/src/hardware/mixer.cpp +++ b/src/hardware/mixer.cpp @@ -18,7 +18,7 @@ /* $Id: mixer.cpp,v 1.53 2009/04/28 21:48:24 harekiet Exp $ */ -/* +/* Remove the sdl code from here and have it handeld in the sdlmain. That should call the mixer start from there or something. */ @@ -265,7 +265,7 @@ thestart: void MixerChannel::AddStretched(Bitu len,Bit16s * data) { if (done>=needed) { - LOG_MSG("Can't add, buffer full"); + LOG_MSG("Can't add, buffer full"); return; } Bitu outlen=needed-done;Bits diff; @@ -353,7 +353,7 @@ void MixerChannel::FillUp(void) { extern bool ticksLocked; static inline bool Mixer_irq_important(void) { - /* In some states correct timing of the irqs is more important then + /* In some states correct timing of the irqs is more important then * non stuttering audo */ return (ticksLocked || (CaptureState & (CAPTURE_WAVE|CAPTURE_VIDEO))); } @@ -368,7 +368,7 @@ static void MIXER_MixData(Bitu needed) { if (CaptureState & (CAPTURE_WAVE|CAPTURE_VIDEO)) { Bit16s convert[1024][2]; Bitu added=needed-mixer.done; - if (added>1024) + if (added>1024) added=1024; Bitu readpos=(mixer.pos+mixer.done)&MIXER_BUFMASK; for (Bitu i=0;i MIXER_BUFSIZE) index_add = MIXER_BUFSIZE - 2*mixer.min_needed; - else + else index_add = mixer.done - 2*mixer.min_needed; index_add = (index_add << MIXER_SHIFT) / need; reduce = mixer.done - 2* mixer.min_needed; @@ -480,7 +480,7 @@ static void MIXER_CallBack(void * userdata, Uint8 *stream, int len) { if (chan->done>reduce) chan->done-=reduce; else chan->done=0; } - + // Reset mixer.tick_add when irqs are important if( Mixer_irq_important() ) mixer.tick_add=(mixer.freq<< MIXER_SHIFT)/1000; @@ -570,7 +570,7 @@ public: chan=mixer.channels; WriteOut("Channel Main Main(dB)\n"); ShowVolume("MASTER",mixer.mastervol[0],mixer.mastervol[1]); - for (chan=mixer.channels;chan;chan=chan->next) + for (chan=mixer.channels;chan;chan=chan->next) ShowVolume(chan->name,chan->volmain[0],chan->volmain[1]); } private: @@ -583,7 +583,7 @@ private: void ListMidi(){ #if defined (WIN32) - unsigned int total = midiOutGetNumDevs(); + unsigned int total = midiOutGetNumDevs(); for(unsigned int i=0;i +#include void WiiInit(); void WiiFinished();