From: <sag...@us...> - 2013-04-12 15:30:31
|
Revision: 1860 http://sourceforge.net/p/modplug/code/1860 Author: saga-games Date: 2013-04-12 15:30:19 +0000 (Fri, 12 Apr 2013) Log Message: ----------- [Ref] Right and left channel volume variable names were swapped ever since. Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/soundlib/Fastmix.cpp trunk/OpenMPT/soundlib/ModChannel.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndmix.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2013-04-12 15:13:14 UTC (rev 1859) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2013-04-12 15:30:19 UTC (rev 1860) @@ -988,7 +988,7 @@ pChn->nGlobalVol = 64; pChn->nInsVol = 64; pChn->nPan = 128; - pChn->nRightVol = pChn->nLeftVol = 0; + pChn->leftVol = pChn->rightVol = 0; pChn->nROfs = pChn->nLOfs = 0; pChn->nCutOff = 0x7F; pChn->nResonance = 0; Modified: trunk/OpenMPT/soundlib/Fastmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-12 15:13:14 UTC (rev 1859) +++ trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-12 15:30:19 UTC (rev 1860) @@ -270,40 +270,40 @@ ///////////////////////////////////////////////////////////////////////////// #define SNDMIX_STOREMONOVOL\ - pvol[0] += vol * pChn->nRightVol;\ - pvol[1] += vol * pChn->nLeftVol;\ + pvol[0] += vol * pChn->leftVol;\ + pvol[1] += vol * pChn->rightVol;\ pvol += 2; #define SNDMIX_STORESTEREOVOL\ - pvol[0] += vol_l * pChn->nRightVol;\ - pvol[1] += vol_r * pChn->nLeftVol;\ + pvol[0] += vol_l * pChn->leftVol;\ + pvol[1] += vol_r * pChn->rightVol;\ pvol += 2; #define SNDMIX_STOREFASTMONOVOL\ - int v = vol * pChn->nRightVol;\ + int v = vol * pChn->leftVol;\ pvol[0] += v;\ pvol[1] += v;\ pvol += 2; #define SNDMIX_RAMPMONOVOL\ - nRampLeftVol += pChn->nLeftRamp;\ - nRampRightVol += pChn->nRightRamp;\ - pvol[0] += vol * (nRampRightVol >> VOLUMERAMPPRECISION);\ - pvol[1] += vol * (nRampLeftVol >> VOLUMERAMPPRECISION);\ + rampLeftVol += pChn->leftRamp;\ + rampRightVol += pChn->rightRamp;\ + pvol[0] += vol * (rampLeftVol >> VOLUMERAMPPRECISION);\ + pvol[1] += vol * (rampRightVol >> VOLUMERAMPPRECISION);\ pvol += 2; #define SNDMIX_RAMPFASTMONOVOL\ - nRampRightVol += pChn->nRightRamp;\ - int fastvol = vol * (nRampRightVol >> VOLUMERAMPPRECISION);\ + rampLeftVol += pChn->leftRamp;\ + int fastvol = vol * (rampLeftVol >> VOLUMERAMPPRECISION);\ pvol[0] += fastvol;\ pvol[1] += fastvol;\ pvol += 2; #define SNDMIX_RAMPSTEREOVOL\ - nRampLeftVol += pChn->nLeftRamp;\ - nRampRightVol += pChn->nRightRamp;\ - pvol[0] += vol_l * (nRampRightVol >> VOLUMERAMPPRECISION);\ - pvol[1] += vol_r * (nRampLeftVol >> VOLUMERAMPPRECISION);\ + rampLeftVol += pChn->leftRamp;\ + rampRightVol += pChn->rightRamp;\ + pvol[0] += vol_l * (rampLeftVol >> VOLUMERAMPPRECISION);\ + pvol[1] += vol_r * (rampRightVol >> VOLUMERAMPPRECISION);\ pvol += 2; @@ -388,27 +388,27 @@ // Volume Ramps #define BEGIN_RAMPMIX_INTERFACE(func)\ BEGIN_MIX_INTERFACE(func)\ - LONG nRampRightVol = pChannel->nRampRightVol;\ - LONG nRampLeftVol = pChannel->nRampLeftVol; + LONG rampLeftVol = pChannel->rampLeftVol;\ + LONG rampRightVol = pChannel->rampRightVol; #define END_RAMPMIX_INTERFACE()\ SNDMIX_ENDSAMPLELOOP\ - pChannel->nRampRightVol = nRampRightVol;\ - pChannel->nRightVol = nRampRightVol >> VOLUMERAMPPRECISION;\ - pChannel->nRampLeftVol = nRampLeftVol;\ - pChannel->nLeftVol = nRampLeftVol >> VOLUMERAMPPRECISION;\ + pChannel->rampLeftVol = rampLeftVol;\ + pChannel->leftVol = rampLeftVol >> VOLUMERAMPPRECISION;\ + pChannel->rampRightVol = rampRightVol;\ + pChannel->rightVol = rampRightVol >> VOLUMERAMPPRECISION;\ } #define BEGIN_FASTRAMPMIX_INTERFACE(func)\ BEGIN_MIX_INTERFACE(func)\ - LONG nRampRightVol = pChannel->nRampRightVol; + LONG rampLeftVol = pChannel->rampLeftVol; #define END_FASTRAMPMIX_INTERFACE()\ SNDMIX_ENDSAMPLELOOP\ - pChannel->nRampRightVol = nRampRightVol;\ - pChannel->nRampLeftVol = nRampRightVol;\ - pChannel->nRightVol = nRampRightVol >> VOLUMERAMPPRECISION;\ - pChannel->nLeftVol = pChannel->nRightVol;\ + pChannel->rampLeftVol = rampLeftVol;\ + pChannel->rampRightVol = rampLeftVol;\ + pChannel->leftVol = rampLeftVol >> VOLUMERAMPPRECISION;\ + pChannel->rightVol = pChannel->leftVol;\ } @@ -423,15 +423,15 @@ #define BEGIN_RAMPMIX_FLT_INTERFACE(func)\ BEGIN_MIX_INTERFACE(func)\ - LONG nRampRightVol = pChannel->nRampRightVol;\ - LONG nRampLeftVol = pChannel->nRampLeftVol; + LONG rampLeftVol = pChannel->rampLeftVol;\ + LONG rampRightVol = pChannel->rampRightVol; #define END_RAMPMIX_FLT_INTERFACE()\ SNDMIX_ENDSAMPLELOOP\ - pChannel->nRampRightVol = nRampRightVol;\ - pChannel->nRightVol = nRampRightVol >> VOLUMERAMPPRECISION;\ - pChannel->nRampLeftVol = nRampLeftVol;\ - pChannel->nLeftVol = nRampLeftVol >> VOLUMERAMPPRECISION;\ + pChannel->rampLeftVol = rampLeftVol;\ + pChannel->leftVol = rampLeftVol >> VOLUMERAMPPRECISION;\ + pChannel->rampRightVol = rampRightVol;\ + pChannel->rightVol = rampRightVol >> VOLUMERAMPPRECISION;\ } // Stereo Resonant Filters @@ -445,15 +445,15 @@ #define BEGIN_RAMPMIX_STFLT_INTERFACE(func)\ BEGIN_MIX_INTERFACE(func)\ - LONG nRampRightVol = pChannel->nRampRightVol;\ - LONG nRampLeftVol = pChannel->nRampLeftVol; + LONG rampLeftVol = pChannel->rampLeftVol;\ + LONG rampRightVol = pChannel->rampRightVol; #define END_RAMPMIX_STFLT_INTERFACE()\ SNDMIX_ENDSAMPLELOOP\ - pChannel->nRampRightVol = nRampRightVol;\ - pChannel->nRightVol = nRampRightVol >> VOLUMERAMPPRECISION;\ - pChannel->nRampLeftVol = nRampLeftVol;\ - pChannel->nLeftVol = nRampLeftVol >> VOLUMERAMPPRECISION;\ + pChannel->rampLeftVol = rampLeftVol;\ + pChannel->leftVol = rampLeftVol >> VOLUMERAMPPRECISION;\ + pChannel->rampRightVol = rampRightVol;\ + pChannel->rightVol = rampRightVol >> VOLUMERAMPPRECISION;\ } @@ -1476,8 +1476,8 @@ //rewbs.resamplerConf nFlags |= GetResamplingFlag(pChannel); //end rewbs.resamplerConf - if ((nFlags < 0x20) && (pChannel->nLeftVol == pChannel->nRightVol) - && ((!pChannel->nRampLength) || (pChannel->nLeftRamp == pChannel->nRightRamp))) + if ((nFlags < 0x20) && (pChannel->rightVol == pChannel->leftVol) + && ((!pChannel->nRampLength) || (pChannel->rightRamp == pChannel->leftRamp))) { pMixFuncTable = gpFastMixFunctionTable; } else @@ -1568,7 +1568,7 @@ // Should we mix this channel ? UINT naddmix; if (((nchmixed >= m_MixerSettings.m_nMaxMixChannels) && !IsRenderingToDisc()) - || ((!pChannel->nRampLength) && (!(pChannel->nLeftVol|pChannel->nRightVol)))) + || ((!pChannel->nRampLength) && (!(pChannel->rightVol|pChannel->leftVol)))) { LONG delta = (pChannel->nInc * (LONG)nSmpCount) + (LONG)pChannel->nPosLo; pChannel->nPosLo = delta & 0xFFFF; @@ -1598,9 +1598,9 @@ if (pChannel->nRampLength <= 0) { pChannel->nRampLength = 0; - pChannel->nRightVol = pChannel->nNewRightVol; - pChannel->nLeftVol = pChannel->nNewLeftVol; - pChannel->nRightRamp = pChannel->nLeftRamp = 0; + pChannel->leftVol = pChannel->newLeftVol; + pChannel->rightVol = pChannel->newRightVol; + pChannel->leftRamp = pChannel->rightRamp = 0; if(pChannel->dwFlags[CHN_NOTEFADE] && !pChannel->nFadeOutVol) { pChannel->nLength = 0; Modified: trunk/OpenMPT/soundlib/ModChannel.cpp =================================================================== --- trunk/OpenMPT/soundlib/ModChannel.cpp 2013-04-12 15:13:14 UTC (rev 1859) +++ trunk/OpenMPT/soundlib/ModChannel.cpp 2013-04-12 15:30:19 UTC (rev 1860) @@ -49,9 +49,9 @@ nCutOff = 0x7F; nResonance = 0; nFilterMode = 0; - nLeftVol = nRightVol = 0; - nNewLeftVol = nNewRightVol = 0; - nLeftRamp = nRightRamp = 0; + rightVol = leftVol = 0; + newRightVol = newLeftVol = 0; + rightRamp = leftRamp = 0; nVolume = 256; nVibratoPos = nTremoloPos = nPanbrelloPos = 0; Modified: trunk/OpenMPT/soundlib/ModChannel.h =================================================================== --- trunk/OpenMPT/soundlib/ModChannel.h 2013-04-12 15:13:14 UTC (rev 1859) +++ trunk/OpenMPT/soundlib/ModChannel.h 2013-04-12 15:30:19 UTC (rev 1860) @@ -34,17 +34,17 @@ uint32 nPos; // Current play position uint32 nPosLo; // 16-bit fractional part of play position int32 nInc; // 16.16 fixed point sample speed relative to mixing frequency (0x10000 = one sample per output sample, 0x20000 = two samples per output sample, etc...) - int32 nRightVol; // This is actually LEFT! >:( FIX THIS! - int32 nLeftVol; - int32 nRightRamp; - int32 nLeftRamp; + int32 leftVol; + int32 rightVol; + int32 leftRamp; + int32 rightRamp; SmpLength nLength; SmpLength nLoopStart; SmpLength nLoopEnd; FlagSet<ChannelFlags> dwFlags; - int32 nRampRightVol; - int32 nRampLeftVol; + int32 rampLeftVol; + int32 rampRightVol; float nFilter_Y1, nFilter_Y2; // Mono / left channel filter memory float nFilter_Y3, nFilter_Y4; // Right channel filter memory float nFilter_A0, nFilter_B0, nFilter_B1; // Filter coeffs @@ -53,11 +53,11 @@ int32 nRampLength; // Information not used in the mixer - FlagSet<ChannelFlags> dwOldFlags; // Flags from previous tick const void *pSample; // Currently playing sample, or previously played sample if no sample is playing. ModSample *pModSample; // Currently assigned sample slot ModInstrument *pModInstrument; // Currently assigned instrument slot - int32 nNewRightVol, nNewLeftVol; + FlagSet<ChannelFlags> dwOldFlags; // Flags from previous tick + int32 newLeftVol, newRightVol; int32 nRealVolume, nRealPan; int32 nVolume, nPan, nFadeOutVol; int32 nPeriod, nC5Speed, nPortamentoDest; Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-04-12 15:13:14 UTC (rev 1859) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-04-12 15:30:19 UTC (rev 1860) @@ -1223,7 +1223,7 @@ pChn->nVibratoPos = 0; } } - pChn->nLeftVol = pChn->nRightVol = 0; + pChn->rightVol = pChn->leftVol = 0; bool useFilter = !m_SongFlags[SONG_MPTFILTERMODE]; // Setup Initial Filter for this note if(pIns) @@ -1309,7 +1309,7 @@ // Always NNA cut - using if(!(GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_MT2)) || !m_nInstruments || forceCut) { - if(!pChn->nLength || pChn->dwFlags[CHN_MUTE] || !(pChn->nLeftVol | pChn->nRightVol)) + if(!pChn->nLength || pChn->dwFlags[CHN_MUTE] || !(pChn->rightVol | pChn->leftVol)) { return; } @@ -1328,7 +1328,7 @@ // Stop this channel pChn->nLength = pChn->nPos = pChn->nPosLo = 0; pChn->nROfs = pChn->nLOfs = 0; - pChn->nLeftVol = pChn->nRightVol = 0; + pChn->rightVol = pChn->leftVol = 0; return; } if(instr >= MAX_INSTRUMENTS) instr = 0; @@ -3887,7 +3887,7 @@ oldcutoff -= pChn->nCutOff; if(oldcutoff < 0) oldcutoff = -oldcutoff; if((pChn->nVolume > 0) || (oldcutoff < 0x10) - || !pChn->dwFlags[CHN_FILTER] || (!(pChn->nLeftVol | pChn->nRightVol))) + || !pChn->dwFlags[CHN_FILTER] || (!(pChn->rightVol | pChn->leftVol))) SetupChannelFilter(pChn, !pChn->dwFlags[CHN_FILTER]); return 4; Modified: trunk/OpenMPT/soundlib/Sndmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp 2013-04-12 15:13:14 UTC (rev 1859) +++ trunk/OpenMPT/soundlib/Sndmix.cpp 2013-04-12 15:30:19 UTC (rev 1860) @@ -152,11 +152,11 @@ { ModChannel *pramp = &Chn[ChnMix[noff]]; if (!pramp) continue; - pramp->nNewLeftVol = pramp->nNewRightVol = 0; - pramp->nRightRamp = (-pramp->nRightVol << VOLUMERAMPPRECISION) / nRampLength; - pramp->nLeftRamp = (-pramp->nLeftVol << VOLUMERAMPPRECISION) / nRampLength; - pramp->nRampRightVol = pramp->nRightVol << VOLUMERAMPPRECISION; - pramp->nRampLeftVol = pramp->nLeftVol << VOLUMERAMPPRECISION; + pramp->newRightVol = pramp->newLeftVol = 0; + pramp->leftRamp = (-pramp->leftVol << VOLUMERAMPPRECISION) / nRampLength; + pramp->rightRamp = (-pramp->rightVol << VOLUMERAMPPRECISION) / nRampLength; + pramp->rampLeftVol = pramp->leftVol << VOLUMERAMPPRECISION; + pramp->rampRightVol = pramp->rightVol << VOLUMERAMPPRECISION; pramp->nRampLength = nRampLength; pramp->dwFlags.set(CHN_VOLUMERAMP); } @@ -573,8 +573,8 @@ { pChn->rowCommand = *m; - pChn->nLeftVol = pChn->nNewLeftVol; - pChn->nRightVol = pChn->nNewRightVol; + pChn->rightVol = pChn->newRightVol; + pChn->leftVol = pChn->newLeftVol; pChn->dwFlags.reset(CHN_PORTAMENTO | CHN_VIBRATO | CHN_TREMOLO | CHN_PANBRELLO); pChn->nCommand = CMD_NONE; pChn->m_plugParamValueStep = 0; @@ -1543,10 +1543,10 @@ void CSoundFile::ProcessRamping(ModChannel *pChn) //----------------------------------------------- { - pChn->nRightRamp = pChn->nLeftRamp = 0; - if(pChn->dwFlags[CHN_VOLUMERAMP] && (pChn->nRightVol != pChn->nNewRightVol || pChn->nLeftVol != pChn->nNewLeftVol)) + pChn->leftRamp = pChn->rightRamp = 0; + if(pChn->dwFlags[CHN_VOLUMERAMP] && (pChn->leftVol != pChn->newLeftVol || pChn->rightVol != pChn->newRightVol)) { - const bool rampUp = (pChn->nNewRightVol > pChn->nRightVol) || (pChn->nNewLeftVol > pChn->nLeftVol); + const bool rampUp = (pChn->newLeftVol > pChn->leftVol) || (pChn->newRightVol > pChn->rightVol); LONG rampLength, globalRampLength, instrRampLength = 0; rampLength = globalRampLength = (rampUp ? gnVolumeRampUpSamplesActual : m_MixerSettings.glVolumeRampDownSamples); //XXXih: add real support for bidi ramping here @@ -1563,13 +1563,13 @@ rampLength = 1; } - LONG nRightDelta = ((pChn->nNewRightVol - pChn->nRightVol) << VOLUMERAMPPRECISION); - LONG nLeftDelta = ((pChn->nNewLeftVol - pChn->nLeftVol) << VOLUMERAMPPRECISION); + LONG leftDelta = ((pChn->newLeftVol - pChn->leftVol) << VOLUMERAMPPRECISION); + LONG rightDelta = ((pChn->newRightVol - pChn->rightVol) << VOLUMERAMPPRECISION); // if (IsRenderingToDisc() // || m_Resampler.IsHQ()) if(IsRenderingToDisc() || (m_Resampler.IsHQ() && !enableCustomRamp)) { - if((pChn->nRightVol | pChn->nLeftVol) && (pChn->nNewRightVol | pChn->nNewLeftVol) && !pChn->dwFlags[CHN_FASTVOLRAMP]) + if((pChn->leftVol | pChn->rightVol) && (pChn->newLeftVol | pChn->newRightVol) && !pChn->dwFlags[CHN_FASTVOLRAMP]) { rampLength = m_nBufferCount; if(rampLength > (1 << (VOLUMERAMPPRECISION-1))) @@ -1583,28 +1583,28 @@ } } - pChn->nRightRamp = nRightDelta / rampLength; - pChn->nLeftRamp = nLeftDelta / rampLength; - pChn->nRightVol = pChn->nNewRightVol - ((pChn->nRightRamp * rampLength) >> VOLUMERAMPPRECISION); - pChn->nLeftVol = pChn->nNewLeftVol - ((pChn->nLeftRamp * rampLength) >> VOLUMERAMPPRECISION); + pChn->leftRamp = leftDelta / rampLength; + pChn->rightRamp = rightDelta / rampLength; + pChn->leftVol = pChn->newLeftVol - ((pChn->leftRamp * rampLength) >> VOLUMERAMPPRECISION); + pChn->rightVol = pChn->newRightVol - ((pChn->rightRamp * rampLength) >> VOLUMERAMPPRECISION); - if (pChn->nRightRamp|pChn->nLeftRamp) + if (pChn->leftRamp|pChn->rightRamp) { pChn->nRampLength = rampLength; } else { pChn->dwFlags.reset(CHN_VOLUMERAMP); - pChn->nRightVol = pChn->nNewRightVol; - pChn->nLeftVol = pChn->nNewLeftVol; + pChn->leftVol = pChn->newLeftVol; + pChn->rightVol = pChn->newRightVol; } } else { pChn->dwFlags.reset(CHN_VOLUMERAMP); - pChn->nRightVol = pChn->nNewRightVol; - pChn->nLeftVol = pChn->nNewLeftVol; + pChn->leftVol = pChn->newLeftVol; + pChn->rightVol = pChn->newRightVol; } - pChn->nRampRightVol = pChn->nRightVol << VOLUMERAMPPRECISION; - pChn->nRampLeftVol = pChn->nLeftVol << VOLUMERAMPPRECISION; + pChn->rampLeftVol = pChn->leftVol << VOLUMERAMPPRECISION; + pChn->rampRightVol = pChn->rightVol << VOLUMERAMPPRECISION; } @@ -1683,7 +1683,7 @@ // FT2 Compatibility: Prevent notes to be stopped after a fadeout. This way, a portamento effect can pick up a faded instrument which is long enough. // This occours for example in the bassline (channel 11) of jt_burn.xm. I hope this won't break anything else... // I also suppose this could decrease mixing performance a bit, but hey, which CPU can't handle 32 muted channels these days... :-) - if(pChn->dwFlags[CHN_NOTEFADE] && (!(pChn->nFadeOutVol|pChn->nRightVol|pChn->nLeftVol)) && (!IsCompatibleMode(TRK_FASTTRACKER2))) + if(pChn->dwFlags[CHN_NOTEFADE] && (!(pChn->nFadeOutVol|pChn->leftVol|pChn->rightVol)) && (!IsCompatibleMode(TRK_FASTTRACKER2))) { pChn->nLength = 0; pChn->nROfs = pChn->nLOfs = 0; @@ -1909,7 +1909,7 @@ } // Volume ramping - pChn->dwFlags.set(CHN_VOLUMERAMP, (pChn->nRealVolume | pChn->nLeftVol | pChn->nRightVol) != 0); + pChn->dwFlags.set(CHN_VOLUMERAMP, (pChn->nRealVolume | pChn->rightVol | pChn->leftVol) != 0); #ifdef ENABLE_STEREOVU if (pChn->nLeftVU > VUMETER_DECAY) pChn->nLeftVU -= VUMETER_DECAY; else pChn->nLeftVU = 0; @@ -1918,7 +1918,7 @@ // Check for too big nInc if (((pChn->nInc >> 16) + 1) >= (LONG)(pChn->nLoopEnd - pChn->nLoopStart)) pChn->dwFlags.reset(CHN_LOOP); - pChn->nNewRightVol = pChn->nNewLeftVol = 0; + pChn->newLeftVol = pChn->newRightVol = 0; pChn->pCurrentSample = ((pChn->pSample) && (pChn->nLength) && (pChn->nInc)) ? pChn->pSample : NULL; if (pChn->pCurrentSample) { @@ -1966,23 +1966,23 @@ { if (pan < 128) { - pChn->nNewLeftVol = (realvol * pan) >> 8; - pChn->nNewRightVol = (realvol * 128) >> 8; + pChn->newLeftVol = (realvol * 128) >> 8; + pChn->newRightVol = (realvol * pan) >> 8; } else { - pChn->nNewLeftVol = (realvol * 128) >> 8; - pChn->nNewRightVol = (realvol * (256 - pan)) >> 8; + pChn->newLeftVol = (realvol * (256 - pan)) >> 8; + pChn->newRightVol = (realvol * 128) >> 8; } } else { - pChn->nNewLeftVol = (realvol * pan) >> 8; - pChn->nNewRightVol = (realvol * (256 - pan)) >> 8; + pChn->newLeftVol = (realvol * (256 - pan)) >> 8; + pChn->newRightVol = (realvol * pan) >> 8; } } else { - pChn->nNewRightVol = (pChn->nRealVolume * kChnMasterVol) >> 8; - pChn->nNewLeftVol = pChn->nNewRightVol; + pChn->newLeftVol = (pChn->nRealVolume * kChnMasterVol) >> 8; + pChn->newRightVol = pChn->newLeftVol; } // Clipping volumes //if (pChn->nNewRightVol > 0xFFFF) pChn->nNewRightVol = 0xFFFF; @@ -2004,8 +2004,8 @@ if (!IsRenderingToDisc() && !m_Resampler.IsUltraHQ()) { int fmax = 0x20000; - if ((pChn->nNewLeftVol < 0x80) && (pChn->nNewRightVol < 0x80) - && (pChn->nLeftVol < 0x80) && (pChn->nRightVol < 0x80)) + if ((pChn->newRightVol < 0x80) && (pChn->newLeftVol < 0x80) + && (pChn->rightVol < 0x80) && (pChn->leftVol < 0x80)) { if (pChn->nInc >= 0xFF00) pChn->dwFlags.set(CHN_NOIDO); } else @@ -2030,11 +2030,11 @@ pChn->nNewLeftVol >>= MIXING_ATTENUATION; }*/ const int extraAttenuation = m_PlayConfig.getExtraSampleAttenuation(); - pChn->nNewRightVol >>= extraAttenuation; - pChn->nNewLeftVol >>= extraAttenuation; + pChn->newLeftVol >>= extraAttenuation; + pChn->newRightVol >>= extraAttenuation; // Dolby Pro-Logic Surround - if(pChn->dwFlags[CHN_SURROUND] && m_MixerSettings.gnChannels == 2) pChn->nNewLeftVol = - pChn->nNewLeftVol; + if(pChn->dwFlags[CHN_SURROUND] && m_MixerSettings.gnChannels == 2) pChn->newRightVol = - pChn->newRightVol; // Checking Ping-Pong Loops if(pChn->dwFlags[CHN_PINGPONGFLAG]) pChn->nInc = -pChn->nInc; @@ -2052,7 +2052,7 @@ if (pChn->nRightVU > 128) pChn->nRightVU = 0; #endif // ENABLE_STEREOVU if (pChn->nVUMeter > 0xFF) pChn->nVUMeter = 0; - pChn->nLeftVol = pChn->nRightVol = 0; + pChn->rightVol = pChn->leftVol = 0; pChn->nLength = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |