| 1 | /* |
| 2 | * This source code is public domain. |
| 3 | * |
| 4 | * Authors: Olivier Lapicque <[email protected]> |
| 5 | */ |
| 6 | |
| 7 | #include "stdafx.h"cxx . . $ `<file>/ext/psmplug/stdafx.h`/ |
| 8 | #include "sndfile.h"cxx . . $ `<file>/ext/psmplug/sndfile.h`/ |
| 9 | |
| 10 | // Delayed Surround Filters |
| 11 | #define nDolbyHiFltAttncxx . . $ `ext/psmplug/snd_dsp.cpp:11:9`! 6 |
| 12 | #define nDolbyHiFltMaskcxx . . $ `ext/psmplug/snd_dsp.cpp:12:9`! 3 |
| 13 | #define DOLBYATTNROUNDUPcxx . . $ `ext/psmplug/snd_dsp.cpp:13:9`! 31 |
| 14 | |
| 15 | // Bass Expansion |
| 16 | #define XBASS_DELAYcxx . . $ `ext/psmplug/snd_dsp.cpp:16:9`! 14 // 2.5 ms |
| 17 | |
| 18 | // Buffer Sizes |
| 19 | #define XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`! 64 // 2 ms at 50KHz |
| 20 | #define FILTERBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:20:9`! 64 // 1.25 ms |
| 21 | #define SURROUNDBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:21:9`! ((MAX_SAMPLE_RATEcxx . . $ `ext/psmplug/sndfile.h:22:9`! * 50) / 1000) |
| 22 | #define REVERBBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:22:9`! ((MAX_SAMPLE_RATEcxx . . $ `ext/psmplug/sndfile.h:22:9`! * 200) / 1000) |
| 23 | #define REVERBBUFFERSIZE2cxx . . $ `ext/psmplug/snd_dsp.cpp:23:9`! ((REVERBBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:22:9`!*13) / 17) |
| 24 | #define REVERBBUFFERSIZE3cxx . . $ `ext/psmplug/snd_dsp.cpp:24:9`! ((REVERBBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:22:9`!*7) / 13) |
| 25 | #define REVERBBUFFERSIZE4cxx . . $ `ext/psmplug/snd_dsp.cpp:25:9`! ((REVERBBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:22:9`!*7) / 19) |
| 26 | |
| 27 | |
| 28 | // DSP Effects: PUBLIC members |
| 29 | UINTcxx . . $ UINT# CSoundFilecxx . . $ CSoundFile#::m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth. = 6; |
| 30 | UINTcxx . . $ UINT# CSoundFilecxx . . $ CSoundFile#::m_nXBassRangecxx . . $ CSoundFile#m_nXBassRange. = XBASS_DELAYcxx . . $ `ext/psmplug/snd_dsp.cpp:16:9`!; |
| 31 | UINTcxx . . $ UINT# CSoundFilecxx . . $ CSoundFile#::m_nReverbDepthcxx . . $ CSoundFile#m_nReverbDepth. = 1; |
| 32 | UINTcxx . . $ UINT# CSoundFilecxx . . $ CSoundFile#::m_nReverbDelaycxx . . $ CSoundFile#m_nReverbDelay. = 100; |
| 33 | UINTcxx . . $ UINT# CSoundFilecxx . . $ CSoundFile#::m_nProLogicDepthcxx . . $ CSoundFile#m_nProLogicDepth. = 12; |
| 34 | UINTcxx . . $ UINT# CSoundFilecxx . . $ CSoundFile#::m_nProLogicDelaycxx . . $ CSoundFile#m_nProLogicDelay. = 20; |
| 35 | |
| 36 | //////////////////////////////////////////////////////////////////// |
| 37 | // DSP Effects internal state |
| 38 | |
| 39 | // Bass Expansion: low-pass filter |
| 40 | static LONGcxx . . $ LONG# nXBassSumcxx . . $ nXBassSum. = 0; |
| 41 | static LONGcxx . . $ LONG# nXBassBufferPoscxx . . $ nXBassBufferPos. = 0; |
| 42 | static LONGcxx . . $ LONG# nXBassDlyPoscxx . . $ nXBassDlyPos. = 0; |
| 43 | static LONGcxx . . $ LONG# nXBassMaskcxx . . $ nXBassMask. = 0; |
| 44 | |
| 45 | // Noise Reduction: simple low-pass filter |
| 46 | static LONGcxx . . $ LONG# nLeftNRcxx . . $ nLeftNR. = 0; |
| 47 | static LONGcxx . . $ LONG# nRightNRcxx . . $ nRightNR. = 0; |
| 48 | |
| 49 | // Surround Encoding: 1 delay line + low-pass filter + high-pass filter |
| 50 | static LONGcxx . . $ LONG# nSurroundSizecxx . . $ nSurroundSize. = 0; |
| 51 | static LONGcxx . . $ LONG# nSurroundPoscxx . . $ nSurroundPos. = 0; |
| 52 | static LONGcxx . . $ LONG# nDolbyDepthcxx . . $ nDolbyDepth. = 0; |
| 53 | static LONGcxx . . $ LONG# nDolbyLoDlyPoscxx . . $ nDolbyLoDlyPos. = 0; |
| 54 | static LONGcxx . . $ LONG# nDolbyLoFltPoscxx . . $ nDolbyLoFltPos. = 0; |
| 55 | static LONGcxx . . $ LONG# nDolbyLoFltSumcxx . . $ nDolbyLoFltSum. = 0; |
| 56 | static LONGcxx . . $ LONG# nDolbyHiFltPoscxx . . $ nDolbyHiFltPos. = 0; |
| 57 | static LONGcxx . . $ LONG# nDolbyHiFltSumcxx . . $ nDolbyHiFltSum. = 0; |
| 58 | |
| 59 | // Reverb: 4 delay lines + high-pass filter + low-pass filter |
| 60 | #ifndef MODPLUG_NO_REVERB |
| 61 | static LONGcxx . . $ LONG# nReverbSizecxx . . $ nReverbSize. = 0; |
| 62 | static LONGcxx . . $ LONG# nReverbBufferPoscxx . . $ nReverbBufferPos. = 0; |
| 63 | static LONGcxx . . $ LONG# nReverbSize2cxx . . $ nReverbSize2. = 0; |
| 64 | static LONGcxx . . $ LONG# nReverbBufferPos2cxx . . $ nReverbBufferPos2. = 0; |
| 65 | static LONGcxx . . $ LONG# nReverbSize3cxx . . $ nReverbSize3. = 0; |
| 66 | static LONGcxx . . $ LONG# nReverbBufferPos3cxx . . $ nReverbBufferPos3. = 0; |
| 67 | static LONGcxx . . $ LONG# nReverbSize4cxx . . $ nReverbSize4. = 0; |
| 68 | static LONGcxx . . $ LONG# nReverbBufferPos4cxx . . $ nReverbBufferPos4. = 0; |
| 69 | static LONGcxx . . $ LONG# nReverbLoFltSumcxx . . $ nReverbLoFltSum. = 0; |
| 70 | static LONGcxx . . $ LONG# nReverbLoFltPoscxx . . $ nReverbLoFltPos. = 0; |
| 71 | static LONGcxx . . $ LONG# nReverbLoDlyPoscxx . . $ nReverbLoDlyPos. = 0; |
| 72 | static LONGcxx . . $ LONG# nFilterAttncxx . . $ nFilterAttn. = 0; |
| 73 | static LONGcxx . . $ LONG# gRvbLowPasscxx . . $ gRvbLowPass.[8]; |
| 74 | static LONGcxx . . $ LONG# gRvbLPPoscxx . . $ gRvbLPPos. = 0; |
| 75 | static LONGcxx . . $ LONG# gRvbLPSumcxx . . $ gRvbLPSum. = 0; |
| 76 | static LONGcxx . . $ LONG# ReverbLoFilterBuffercxx . . $ ReverbLoFilterBuffer.[XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!]; |
| 77 | static LONGcxx . . $ LONG# ReverbLoFilterDelaycxx . . $ ReverbLoFilterDelay.[XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!]; |
| 78 | static LONGcxx . . $ LONG# ReverbBuffercxx . . $ ReverbBuffer.[REVERBBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:22:9`!]; |
| 79 | static LONGcxx . . $ LONG# ReverbBuffer2cxx . . $ ReverbBuffer2.[REVERBBUFFERSIZE2cxx . . $ `ext/psmplug/snd_dsp.cpp:23:9`!]; |
| 80 | static LONGcxx . . $ LONG# ReverbBuffer3cxx . . $ ReverbBuffer3.[REVERBBUFFERSIZE3cxx . . $ `ext/psmplug/snd_dsp.cpp:24:9`!]; |
| 81 | static LONGcxx . . $ LONG# ReverbBuffer4cxx . . $ ReverbBuffer4.[REVERBBUFFERSIZE4cxx . . $ `ext/psmplug/snd_dsp.cpp:25:9`!]; |
| 82 | #endif |
| 83 | static LONGcxx . . $ LONG# XBassBuffercxx . . $ XBassBuffer.[XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!]; |
| 84 | static LONGcxx . . $ LONG# XBassDelaycxx . . $ XBassDelay.[XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!]; |
| 85 | static LONGcxx . . $ LONG# DolbyLoFilterBuffercxx . . $ DolbyLoFilterBuffer.[XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!]; |
| 86 | static LONGcxx . . $ LONG# DolbyLoFilterDelaycxx . . $ DolbyLoFilterDelay.[XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!]; |
| 87 | static LONGcxx . . $ LONG# DolbyHiFilterBuffercxx . . $ DolbyHiFilterBuffer.[FILTERBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:20:9`!]; |
| 88 | static LONGcxx . . $ LONG# SurroundBuffercxx . . $ SurroundBuffer.[SURROUNDBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:21:9`!]; |
| 89 | |
| 90 | // Access the main temporary mix buffer directly: avoids an extra pointer |
| 91 | extern int MixSoundBuffercxx . . $ MixSoundBuffer.[MIXBUFFERSIZEcxx . . $ `ext/psmplug/sndfile.h:884:9`!*4]; |
| 92 | extern int MixReverbBuffercxx . . $ MixReverbBuffer.[MIXBUFFERSIZEcxx . . $ `ext/psmplug/sndfile.h:884:9`!*2]; |
| 93 | |
| 94 | static UINTcxx . . $ UINT# GetMaskFromSizecxx . . $ GetMaskFromSize(2141b656ce2cc063).(UINTcxx . . $ UINT# len) |
| 95 | //----------------------------------- |
| 96 | { |
| 97 | UINTcxx . . $ UINT# n = 2; |
| 98 | while (n <= len) n <<= 1; |
| 99 | return ((n >> 1) - 1); |
| 100 | } |
| 101 | |
| 102 | |
| 103 | void CSoundFilecxx . . $ CSoundFile#::InitializeDSPcxx . . $ CSoundFile#InitializeDSP(b45ddcbc8423892c).(BOOLcxx . . $ BOOL# bReset) |
| 104 | //----------------------------------------- |
| 105 | { |
| 106 | if (!m_nReverbDelaycxx . . $ CSoundFile#m_nReverbDelay.) m_nReverbDelaycxx . . $ CSoundFile#m_nReverbDelay. = 100; |
| 107 | if (!m_nXBassRangecxx . . $ CSoundFile#m_nXBassRange.) m_nXBassRangecxx . . $ CSoundFile#m_nXBassRange. = XBASS_DELAYcxx . . $ `ext/psmplug/snd_dsp.cpp:16:9`!; |
| 108 | if (!m_nProLogicDelaycxx . . $ CSoundFile#m_nProLogicDelay.) m_nProLogicDelaycxx . . $ CSoundFile#m_nProLogicDelay. = 20; |
| 109 | if (m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth. > 8) m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth. = 8; |
| 110 | if (m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth. < 2) m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth. = 2; |
| 111 | if (bReset) |
| 112 | { |
| 113 | // Noise Reduction |
| 114 | nLeftNRcxx . . $ nLeftNR. = nRightNRcxx . . $ nRightNR. = 0; |
| 115 | } |
| 116 | // Pro-Logic Surround |
| 117 | nSurroundPoscxx . . $ nSurroundPos. = nSurroundSizecxx . . $ nSurroundSize. = 0; |
| 118 | nDolbyLoFltPoscxx . . $ nDolbyLoFltPos. = nDolbyLoFltSumcxx . . $ nDolbyLoFltSum. = nDolbyLoDlyPoscxx . . $ nDolbyLoDlyPos. = 0; |
| 119 | nDolbyHiFltPoscxx . . $ nDolbyHiFltPos. = nDolbyHiFltSumcxx . . $ nDolbyHiFltSum. = 0; |
| 120 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_SURROUNDcxx . . $ `ext/psmplug/sndfile.h:262:9`!) |
| 121 | { |
| 122 | memset(DolbyLoFilterBuffercxx . . $ DolbyLoFilterBuffer., 0, sizeof(DolbyLoFilterBuffercxx . . $ DolbyLoFilterBuffer.)); |
| 123 | memset(DolbyHiFilterBuffercxx . . $ DolbyHiFilterBuffer., 0, sizeof(DolbyHiFilterBuffercxx . . $ DolbyHiFilterBuffer.)); |
| 124 | memset(DolbyLoFilterDelaycxx . . $ DolbyLoFilterDelay., 0, sizeof(DolbyLoFilterDelaycxx . . $ DolbyLoFilterDelay.)); |
| 125 | memset(SurroundBuffercxx . . $ SurroundBuffer., 0, sizeof(SurroundBuffercxx . . $ SurroundBuffer.)); |
| 126 | nSurroundSizecxx . . $ nSurroundSize. = (gdwMixingFreqcxx . . $ CSoundFile#gdwMixingFreq. * m_nProLogicDelaycxx . . $ CSoundFile#m_nProLogicDelay.) / 1000; |
| 127 | if (nSurroundSizecxx . . $ nSurroundSize. > SURROUNDBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:21:9`!) nSurroundSizecxx . . $ nSurroundSize. = SURROUNDBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:21:9`!; |
| 128 | if (m_nProLogicDepthcxx . . $ CSoundFile#m_nProLogicDepth. < 8) nDolbyDepthcxx . . $ nDolbyDepth. = (32 >> m_nProLogicDepthcxx . . $ CSoundFile#m_nProLogicDepth.) + 32; |
| 129 | else nDolbyDepthcxx . . $ nDolbyDepth. = (m_nProLogicDepthcxx . . $ CSoundFile#m_nProLogicDepth. < 16) ? (8 + (m_nProLogicDepthcxx . . $ CSoundFile#m_nProLogicDepth. - 8) * 7) : 64; |
| 130 | nDolbyDepthcxx . . $ nDolbyDepth. >>= 2; |
| 131 | } |
| 132 | // Reverb Setup |
| 133 | #ifndef MODPLUG_NO_REVERB |
| 134 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_REVERBcxx . . $ `ext/psmplug/sndfile.h:263:9`!) |
| 135 | { |
| 136 | UINTcxx . . $ UINT# nrs = (gdwMixingFreqcxx . . $ CSoundFile#gdwMixingFreq. * m_nReverbDelaycxx . . $ CSoundFile#m_nReverbDelay.) / 1000; |
| 137 | UINTcxx . . $ UINT# nfa = m_nReverbDepthcxx . . $ CSoundFile#m_nReverbDepth.+1; |
| 138 | if (nrs > REVERBBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:22:9`!) nrs = REVERBBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:22:9`!; |
| 139 | if ((bReset) || (nrs != (UINTcxx . . $ UINT#)nReverbSizecxx . . $ nReverbSize.) || (nfa != (UINTcxx . . $ UINT#)nFilterAttncxx . . $ nFilterAttn.)) |
| 140 | { |
| 141 | nFilterAttncxx . . $ nFilterAttn. = nfa; |
| 142 | nReverbSizecxx . . $ nReverbSize. = nrs; |
| 143 | nReverbBufferPoscxx . . $ nReverbBufferPos. = nReverbBufferPos2cxx . . $ nReverbBufferPos2. = nReverbBufferPos3cxx . . $ nReverbBufferPos3. = nReverbBufferPos4cxx . . $ nReverbBufferPos4. = 0; |
| 144 | nReverbLoFltSumcxx . . $ nReverbLoFltSum. = nReverbLoFltPoscxx . . $ nReverbLoFltPos. = nReverbLoDlyPoscxx . . $ nReverbLoDlyPos. = 0; |
| 145 | gRvbLPSumcxx . . $ gRvbLPSum. = gRvbLPPoscxx . . $ gRvbLPPos. = 0; |
| 146 | nReverbSize2cxx . . $ nReverbSize2. = (nReverbSizecxx . . $ nReverbSize. * 13) / 17; |
| 147 | if (nReverbSize2cxx . . $ nReverbSize2. > REVERBBUFFERSIZE2cxx . . $ `ext/psmplug/snd_dsp.cpp:23:9`!) nReverbSize2cxx . . $ nReverbSize2. = REVERBBUFFERSIZE2cxx . . $ `ext/psmplug/snd_dsp.cpp:23:9`!; |
| 148 | nReverbSize3cxx . . $ nReverbSize3. = (nReverbSizecxx . . $ nReverbSize. * 7) / 13; |
| 149 | if (nReverbSize3cxx . . $ nReverbSize3. > REVERBBUFFERSIZE3cxx . . $ `ext/psmplug/snd_dsp.cpp:24:9`!) nReverbSize3cxx . . $ nReverbSize3. = REVERBBUFFERSIZE3cxx . . $ `ext/psmplug/snd_dsp.cpp:24:9`!; |
| 150 | nReverbSize4cxx . . $ nReverbSize4. = (nReverbSizecxx . . $ nReverbSize. * 7) / 19; |
| 151 | if (nReverbSize4cxx . . $ nReverbSize4. > REVERBBUFFERSIZE4cxx . . $ `ext/psmplug/snd_dsp.cpp:25:9`!) nReverbSize4cxx . . $ nReverbSize4. = REVERBBUFFERSIZE4cxx . . $ `ext/psmplug/snd_dsp.cpp:25:9`!; |
| 152 | memset(ReverbLoFilterBuffercxx . . $ ReverbLoFilterBuffer., 0, sizeof(ReverbLoFilterBuffercxx . . $ ReverbLoFilterBuffer.)); |
| 153 | memset(ReverbLoFilterDelaycxx . . $ ReverbLoFilterDelay., 0, sizeof(ReverbLoFilterDelaycxx . . $ ReverbLoFilterDelay.)); |
| 154 | memset(ReverbBuffercxx . . $ ReverbBuffer., 0, sizeof(ReverbBuffercxx . . $ ReverbBuffer.)); |
| 155 | memset(ReverbBuffer2cxx . . $ ReverbBuffer2., 0, sizeof(ReverbBuffer2cxx . . $ ReverbBuffer2.)); |
| 156 | memset(ReverbBuffer3cxx . . $ ReverbBuffer3., 0, sizeof(ReverbBuffer3cxx . . $ ReverbBuffer3.)); |
| 157 | memset(ReverbBuffer4cxx . . $ ReverbBuffer4., 0, sizeof(ReverbBuffer4cxx . . $ ReverbBuffer4.)); |
| 158 | memset(gRvbLowPasscxx . . $ gRvbLowPass., 0, sizeof(gRvbLowPasscxx . . $ gRvbLowPass.)); |
| 159 | } |
| 160 | } else nReverbSizecxx . . $ nReverbSize. = 0; |
| 161 | #endif |
| 162 | BOOLcxx . . $ BOOL# bResetBass = FALSEcxx . . $ `ext/psmplug/stdafx.h:93:9`!; |
| 163 | // Bass Expansion Reset |
| 164 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_MEGABASScxx . . $ `ext/psmplug/sndfile.h:261:9`!) |
| 165 | { |
| 166 | UINTcxx . . $ UINT# nXBassSamples = (gdwMixingFreqcxx . . $ CSoundFile#gdwMixingFreq. * m_nXBassRangecxx . . $ CSoundFile#m_nXBassRange.) / 10000; |
| 167 | if (nXBassSamples > XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!) nXBassSamples = XBASSBUFFERSIZEcxx . . $ `ext/psmplug/snd_dsp.cpp:19:9`!; |
| 168 | UINTcxx . . $ UINT# mask = GetMaskFromSizecxx . . $ GetMaskFromSize(2141b656ce2cc063).(nXBassSamples); |
| 169 | if ((bReset) || (mask != (UINTcxx . . $ UINT#)nXBassMaskcxx . . $ nXBassMask.)) |
| 170 | { |
| 171 | nXBassMaskcxx . . $ nXBassMask. = mask; |
| 172 | bResetBass = TRUEcxx . . $ `ext/psmplug/stdafx.h:97:9`!; |
| 173 | } |
| 174 | } else |
| 175 | { |
| 176 | nXBassMaskcxx . . $ nXBassMask. = 0; |
| 177 | bResetBass = TRUEcxx . . $ `ext/psmplug/stdafx.h:97:9`!; |
| 178 | } |
| 179 | if (bResetBass) |
| 180 | { |
| 181 | nXBassSumcxx . . $ nXBassSum. = nXBassBufferPoscxx . . $ nXBassBufferPos. = nXBassDlyPoscxx . . $ nXBassDlyPos. = 0; |
| 182 | memset(XBassBuffercxx . . $ XBassBuffer., 0, sizeof(XBassBuffercxx . . $ XBassBuffer.)); |
| 183 | memset(XBassDelaycxx . . $ XBassDelay., 0, sizeof(XBassDelaycxx . . $ XBassDelay.)); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | |
| 188 | void CSoundFilecxx . . $ CSoundFile#::ProcessStereoDSPcxx . . $ CSoundFile#ProcessStereoDSP(d4f767463ce0a6b3).(int count) |
| 189 | //------------------------------------------ |
| 190 | { |
| 191 | #ifndef MODPLUG_NO_REVERB |
| 192 | // Reverb |
| 193 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_REVERBcxx . . $ `ext/psmplug/sndfile.h:263:9`!) |
| 194 | { |
| 195 | int *pr = MixSoundBuffercxx . . $ MixSoundBuffer., *pin = MixReverbBuffercxx . . $ MixReverbBuffer., rvbcount = count; |
| 196 | do |
| 197 | { |
| 198 | int echo = ReverbBuffercxx . . $ ReverbBuffer.[nReverbBufferPoscxx . . $ nReverbBufferPos.] + ReverbBuffer2cxx . . $ ReverbBuffer2.[nReverbBufferPos2cxx . . $ nReverbBufferPos2.] |
| 199 | + ReverbBuffer3cxx . . $ ReverbBuffer3.[nReverbBufferPos3cxx . . $ nReverbBufferPos3.] + ReverbBuffer4cxx . . $ ReverbBuffer4.[nReverbBufferPos4cxx . . $ nReverbBufferPos4.]; // echo = reverb signal |
| 200 | // Delay line and remove Low Frequencies // v = original signal |
| 201 | int echodly = ReverbLoFilterDelaycxx . . $ ReverbLoFilterDelay.[nReverbLoDlyPoscxx . . $ nReverbLoDlyPos.]; // echodly = delayed signal |
| 202 | ReverbLoFilterDelaycxx . . $ ReverbLoFilterDelay.[nReverbLoDlyPoscxx . . $ nReverbLoDlyPos.] = echo >> 1; |
| 203 | nReverbLoDlyPoscxx . . $ nReverbLoDlyPos.++; |
| 204 | nReverbLoDlyPoscxx . . $ nReverbLoDlyPos. &= 0x1F; |
| 205 | int n = nReverbLoFltPoscxx . . $ nReverbLoFltPos.; |
| 206 | nReverbLoFltSumcxx . . $ nReverbLoFltSum. -= ReverbLoFilterBuffercxx . . $ ReverbLoFilterBuffer.[n]; |
| 207 | int tmp = echo / 128; |
| 208 | ReverbLoFilterBuffercxx . . $ ReverbLoFilterBuffer.[n] = tmp; |
| 209 | nReverbLoFltSumcxx . . $ nReverbLoFltSum. += tmp; |
| 210 | echodly -= nReverbLoFltSumcxx . . $ nReverbLoFltSum.; |
| 211 | nReverbLoFltPoscxx . . $ nReverbLoFltPos. = (n + 1) & 0x3F; |
| 212 | // Reverb |
| 213 | int v = (pin[0]+pin[1]) >> nFilterAttncxx . . $ nFilterAttn.; |
| 214 | pr[0] += pin[0] + echodly; |
| 215 | pr[1] += pin[1] + echodly; |
| 216 | v += echodly >> 2; |
| 217 | ReverbBuffer3cxx . . $ ReverbBuffer3.[nReverbBufferPos3cxx . . $ nReverbBufferPos3.] = v; |
| 218 | ReverbBuffer4cxx . . $ ReverbBuffer4.[nReverbBufferPos4cxx . . $ nReverbBufferPos4.] = v; |
| 219 | v += echodly >> 4; |
| 220 | v >>= 1; |
| 221 | gRvbLPSumcxx . . $ gRvbLPSum. -= gRvbLowPasscxx . . $ gRvbLowPass.[gRvbLPPoscxx . . $ gRvbLPPos.]; |
| 222 | gRvbLPSumcxx . . $ gRvbLPSum. += v; |
| 223 | gRvbLowPasscxx . . $ gRvbLowPass.[gRvbLPPoscxx . . $ gRvbLPPos.] = v; |
| 224 | gRvbLPPoscxx . . $ gRvbLPPos.++; |
| 225 | gRvbLPPoscxx . . $ gRvbLPPos. &= 7; |
| 226 | int vlp = gRvbLPSumcxx . . $ gRvbLPSum. >> 2; |
| 227 | ReverbBuffercxx . . $ ReverbBuffer.[nReverbBufferPoscxx . . $ nReverbBufferPos.] = vlp; |
| 228 | ReverbBuffer2cxx . . $ ReverbBuffer2.[nReverbBufferPos2cxx . . $ nReverbBufferPos2.] = vlp; |
| 229 | if (++nReverbBufferPoscxx . . $ nReverbBufferPos. >= nReverbSizecxx . . $ nReverbSize.) nReverbBufferPoscxx . . $ nReverbBufferPos. = 0; |
| 230 | if (++nReverbBufferPos2cxx . . $ nReverbBufferPos2. >= nReverbSize2cxx . . $ nReverbSize2.) nReverbBufferPos2cxx . . $ nReverbBufferPos2. = 0; |
| 231 | if (++nReverbBufferPos3cxx . . $ nReverbBufferPos3. >= nReverbSize3cxx . . $ nReverbSize3.) nReverbBufferPos3cxx . . $ nReverbBufferPos3. = 0; |
| 232 | if (++nReverbBufferPos4cxx . . $ nReverbBufferPos4. >= nReverbSize4cxx . . $ nReverbSize4.) nReverbBufferPos4cxx . . $ nReverbBufferPos4. = 0; |
| 233 | pr += 2; |
| 234 | pin += 2; |
| 235 | } while (--rvbcount); |
| 236 | } |
| 237 | #endif |
| 238 | // Dolby Pro-Logic Surround |
| 239 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_SURROUNDcxx . . $ `ext/psmplug/sndfile.h:262:9`!) |
| 240 | { |
| 241 | int *pr = MixSoundBuffercxx . . $ MixSoundBuffer., n = nDolbyLoFltPoscxx . . $ nDolbyLoFltPos.; |
| 242 | for (int r=count; r; r--) |
| 243 | { |
| 244 | int v = (pr[0]+pr[1]+DOLBYATTNROUNDUPcxx . . $ `ext/psmplug/snd_dsp.cpp:13:9`!) >> (nDolbyHiFltAttncxx . . $ `ext/psmplug/snd_dsp.cpp:11:9`!+1); |
| 245 | v *= (int)nDolbyDepthcxx . . $ nDolbyDepth.; |
| 246 | // Low-Pass Filter |
| 247 | nDolbyHiFltSumcxx . . $ nDolbyHiFltSum. -= DolbyHiFilterBuffercxx . . $ DolbyHiFilterBuffer.[nDolbyHiFltPoscxx . . $ nDolbyHiFltPos.]; |
| 248 | DolbyHiFilterBuffercxx . . $ DolbyHiFilterBuffer.[nDolbyHiFltPoscxx . . $ nDolbyHiFltPos.] = v; |
| 249 | nDolbyHiFltSumcxx . . $ nDolbyHiFltSum. += v; |
| 250 | v = nDolbyHiFltSumcxx . . $ nDolbyHiFltSum.; |
| 251 | nDolbyHiFltPoscxx . . $ nDolbyHiFltPos.++; |
| 252 | nDolbyHiFltPoscxx . . $ nDolbyHiFltPos. &= nDolbyHiFltMaskcxx . . $ `ext/psmplug/snd_dsp.cpp:12:9`!; |
| 253 | // Surround |
| 254 | int secho = SurroundBuffercxx . . $ SurroundBuffer.[nSurroundPoscxx . . $ nSurroundPos.]; |
| 255 | SurroundBuffercxx . . $ SurroundBuffer.[nSurroundPoscxx . . $ nSurroundPos.] = v; |
| 256 | // Delay line and remove low frequencies |
| 257 | v = DolbyLoFilterDelaycxx . . $ DolbyLoFilterDelay.[nDolbyLoDlyPoscxx . . $ nDolbyLoDlyPos.]; // v = delayed signal |
| 258 | DolbyLoFilterDelaycxx . . $ DolbyLoFilterDelay.[nDolbyLoDlyPoscxx . . $ nDolbyLoDlyPos.] = secho; // secho = signal |
| 259 | nDolbyLoDlyPoscxx . . $ nDolbyLoDlyPos.++; |
| 260 | nDolbyLoDlyPoscxx . . $ nDolbyLoDlyPos. &= 0x1F; |
| 261 | nDolbyLoFltSumcxx . . $ nDolbyLoFltSum. -= DolbyLoFilterBuffercxx . . $ DolbyLoFilterBuffer.[n]; |
| 262 | int tmp = secho / 64; |
| 263 | DolbyLoFilterBuffercxx . . $ DolbyLoFilterBuffer.[n] = tmp; |
| 264 | nDolbyLoFltSumcxx . . $ nDolbyLoFltSum. += tmp; |
| 265 | v -= nDolbyLoFltSumcxx . . $ nDolbyLoFltSum.; |
| 266 | n++; |
| 267 | n &= 0x3F; |
| 268 | // Add echo |
| 269 | pr[0] += v; |
| 270 | pr[1] -= v; |
| 271 | if (++nSurroundPoscxx . . $ nSurroundPos. >= nSurroundSizecxx . . $ nSurroundSize.) nSurroundPoscxx . . $ nSurroundPos. = 0; |
| 272 | pr += 2; |
| 273 | } |
| 274 | nDolbyLoFltPoscxx . . $ nDolbyLoFltPos. = n; |
| 275 | } |
| 276 | // Bass Expansion |
| 277 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_MEGABASScxx . . $ `ext/psmplug/sndfile.h:261:9`!) |
| 278 | { |
| 279 | int *px = MixSoundBuffercxx . . $ MixSoundBuffer.; |
| 280 | int xba = m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth.+1, xbamask = (1 << xba) - 1; |
| 281 | int n = nXBassBufferPoscxx . . $ nXBassBufferPos.; |
| 282 | for (int x=count; x; x--) |
| 283 | { |
| 284 | nXBassSumcxx . . $ nXBassSum. -= XBassBuffercxx . . $ XBassBuffer.[n]; |
| 285 | int tmp0 = px[0] + px[1]; |
| 286 | int tmp = (tmp0 + ((tmp0 >> 31) & xbamask)) >> xba; |
| 287 | XBassBuffercxx . . $ XBassBuffer.[n] = tmp; |
| 288 | nXBassSumcxx . . $ nXBassSum. += tmp; |
| 289 | int v = XBassDelaycxx . . $ XBassDelay.[nXBassDlyPoscxx . . $ nXBassDlyPos.]; |
| 290 | XBassDelaycxx . . $ XBassDelay.[nXBassDlyPoscxx . . $ nXBassDlyPos.] = px[0]; |
| 291 | px[0] = v + nXBassSumcxx . . $ nXBassSum.; |
| 292 | v = XBassDelaycxx . . $ XBassDelay.[nXBassDlyPoscxx . . $ nXBassDlyPos.+1]; |
| 293 | XBassDelaycxx . . $ XBassDelay.[nXBassDlyPoscxx . . $ nXBassDlyPos.+1] = px[1]; |
| 294 | px[1] = v + nXBassSumcxx . . $ nXBassSum.; |
| 295 | nXBassDlyPoscxx . . $ nXBassDlyPos. = (nXBassDlyPoscxx . . $ nXBassDlyPos. + 2) & nXBassMaskcxx . . $ nXBassMask.; |
| 296 | px += 2; |
| 297 | n++; |
| 298 | n &= nXBassMaskcxx . . $ nXBassMask.; |
| 299 | } |
| 300 | nXBassBufferPoscxx . . $ nXBassBufferPos. = n; |
| 301 | } |
| 302 | // Noise Reduction |
| 303 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_NOISEREDUCTIONcxx . . $ `ext/psmplug/sndfile.h:257:9`!) |
| 304 | { |
| 305 | int n1 = nLeftNRcxx . . $ nLeftNR., n2 = nRightNRcxx . . $ nRightNR.; |
| 306 | int *pnr = MixSoundBuffercxx . . $ MixSoundBuffer.; |
| 307 | for (int nr=count; nr; nr--) |
| 308 | { |
| 309 | int vnr = pnr[0] >> 1; |
| 310 | pnr[0] = vnr + n1; |
| 311 | n1 = vnr; |
| 312 | vnr = pnr[1] >> 1; |
| 313 | pnr[1] = vnr + n2; |
| 314 | n2 = vnr; |
| 315 | pnr += 2; |
| 316 | } |
| 317 | nLeftNRcxx . . $ nLeftNR. = n1; |
| 318 | nRightNRcxx . . $ nRightNR. = n2; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | |
| 323 | void CSoundFilecxx . . $ CSoundFile#::ProcessMonoDSPcxx . . $ CSoundFile#ProcessMonoDSP(d4f767463ce0a6b3).(int count) |
| 324 | //---------------------------------------- |
| 325 | { |
| 326 | #ifndef MODPLUG_NO_REVERB |
| 327 | // Reverb |
| 328 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_REVERBcxx . . $ `ext/psmplug/sndfile.h:263:9`!) |
| 329 | { |
| 330 | int *pr = MixSoundBuffercxx . . $ MixSoundBuffer., rvbcount = count, *pin = MixReverbBuffercxx . . $ MixReverbBuffer.; |
| 331 | do |
| 332 | { |
| 333 | int echo = ReverbBuffercxx . . $ ReverbBuffer.[nReverbBufferPoscxx . . $ nReverbBufferPos.] + ReverbBuffer2cxx . . $ ReverbBuffer2.[nReverbBufferPos2cxx . . $ nReverbBufferPos2.] |
| 334 | + ReverbBuffer3cxx . . $ ReverbBuffer3.[nReverbBufferPos3cxx . . $ nReverbBufferPos3.] + ReverbBuffer4cxx . . $ ReverbBuffer4.[nReverbBufferPos4cxx . . $ nReverbBufferPos4.]; // echo = reverb signal |
| 335 | // Delay line and remove Low Frequencies // v = original signal |
| 336 | int echodly = ReverbLoFilterDelaycxx . . $ ReverbLoFilterDelay.[nReverbLoDlyPoscxx . . $ nReverbLoDlyPos.]; // echodly = delayed signal |
| 337 | ReverbLoFilterDelaycxx . . $ ReverbLoFilterDelay.[nReverbLoDlyPoscxx . . $ nReverbLoDlyPos.] = echo >> 1; |
| 338 | nReverbLoDlyPoscxx . . $ nReverbLoDlyPos.++; |
| 339 | nReverbLoDlyPoscxx . . $ nReverbLoDlyPos. &= 0x1F; |
| 340 | int n = nReverbLoFltPoscxx . . $ nReverbLoFltPos.; |
| 341 | nReverbLoFltSumcxx . . $ nReverbLoFltSum. -= ReverbLoFilterBuffercxx . . $ ReverbLoFilterBuffer.[n]; |
| 342 | int tmp = echo / 128; |
| 343 | ReverbLoFilterBuffercxx . . $ ReverbLoFilterBuffer.[n] = tmp; |
| 344 | nReverbLoFltSumcxx . . $ nReverbLoFltSum. += tmp; |
| 345 | echodly -= nReverbLoFltSumcxx . . $ nReverbLoFltSum.; |
| 346 | nReverbLoFltPoscxx . . $ nReverbLoFltPos. = (n + 1) & 0x3F; |
| 347 | // Reverb |
| 348 | int v = pin[0] >> (nFilterAttncxx . . $ nFilterAttn.-1); |
| 349 | *pr++ += pin[0] + echodly; |
| 350 | pin++; |
| 351 | v += echodly >> 2; |
| 352 | ReverbBuffer3cxx . . $ ReverbBuffer3.[nReverbBufferPos3cxx . . $ nReverbBufferPos3.] = v; |
| 353 | ReverbBuffer4cxx . . $ ReverbBuffer4.[nReverbBufferPos4cxx . . $ nReverbBufferPos4.] = v; |
| 354 | v += echodly >> 4; |
| 355 | v >>= 1; |
| 356 | gRvbLPSumcxx . . $ gRvbLPSum. -= gRvbLowPasscxx . . $ gRvbLowPass.[gRvbLPPoscxx . . $ gRvbLPPos.]; |
| 357 | gRvbLPSumcxx . . $ gRvbLPSum. += v; |
| 358 | gRvbLowPasscxx . . $ gRvbLowPass.[gRvbLPPoscxx . . $ gRvbLPPos.] = v; |
| 359 | gRvbLPPoscxx . . $ gRvbLPPos.++; |
| 360 | gRvbLPPoscxx . . $ gRvbLPPos. &= 7; |
| 361 | int vlp = gRvbLPSumcxx . . $ gRvbLPSum. >> 2; |
| 362 | ReverbBuffercxx . . $ ReverbBuffer.[nReverbBufferPoscxx . . $ nReverbBufferPos.] = vlp; |
| 363 | ReverbBuffer2cxx . . $ ReverbBuffer2.[nReverbBufferPos2cxx . . $ nReverbBufferPos2.] = vlp; |
| 364 | if (++nReverbBufferPoscxx . . $ nReverbBufferPos. >= nReverbSizecxx . . $ nReverbSize.) nReverbBufferPoscxx . . $ nReverbBufferPos. = 0; |
| 365 | if (++nReverbBufferPos2cxx . . $ nReverbBufferPos2. >= nReverbSize2cxx . . $ nReverbSize2.) nReverbBufferPos2cxx . . $ nReverbBufferPos2. = 0; |
| 366 | if (++nReverbBufferPos3cxx . . $ nReverbBufferPos3. >= nReverbSize3cxx . . $ nReverbSize3.) nReverbBufferPos3cxx . . $ nReverbBufferPos3. = 0; |
| 367 | if (++nReverbBufferPos4cxx . . $ nReverbBufferPos4. >= nReverbSize4cxx . . $ nReverbSize4.) nReverbBufferPos4cxx . . $ nReverbBufferPos4. = 0; |
| 368 | } while (--rvbcount); |
| 369 | } |
| 370 | #endif |
| 371 | // Bass Expansion |
| 372 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_MEGABASScxx . . $ `ext/psmplug/sndfile.h:261:9`!) |
| 373 | { |
| 374 | int *px = MixSoundBuffercxx . . $ MixSoundBuffer.; |
| 375 | int xba = m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth., xbamask = (1 << xba)-1; |
| 376 | int n = nXBassBufferPoscxx . . $ nXBassBufferPos.; |
| 377 | for (int x=count; x; x--) |
| 378 | { |
| 379 | nXBassSumcxx . . $ nXBassSum. -= XBassBuffercxx . . $ XBassBuffer.[n]; |
| 380 | int tmp0 = *px; |
| 381 | int tmp = (tmp0 + ((tmp0 >> 31) & xbamask)) >> xba; |
| 382 | XBassBuffercxx . . $ XBassBuffer.[n] = tmp; |
| 383 | nXBassSumcxx . . $ nXBassSum. += tmp; |
| 384 | int v = XBassDelaycxx . . $ XBassDelay.[nXBassDlyPoscxx . . $ nXBassDlyPos.]; |
| 385 | XBassDelaycxx . . $ XBassDelay.[nXBassDlyPoscxx . . $ nXBassDlyPos.] = *px; |
| 386 | *px++ = v + nXBassSumcxx . . $ nXBassSum.; |
| 387 | nXBassDlyPoscxx . . $ nXBassDlyPos. = (nXBassDlyPoscxx . . $ nXBassDlyPos. + 2) & nXBassMaskcxx . . $ nXBassMask.; |
| 388 | n++; |
| 389 | n &= nXBassMaskcxx . . $ nXBassMask.; |
| 390 | } |
| 391 | nXBassBufferPoscxx . . $ nXBassBufferPos. = n; |
| 392 | } |
| 393 | // Noise Reduction |
| 394 | if (gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & SNDMIX_NOISEREDUCTIONcxx . . $ `ext/psmplug/sndfile.h:257:9`!) |
| 395 | { |
| 396 | int n = nLeftNRcxx . . $ nLeftNR.; |
| 397 | int *pnr = MixSoundBuffercxx . . $ MixSoundBuffer.; |
| 398 | for (int nr=count; nr; pnr++, nr--) |
| 399 | { |
| 400 | int vnr = *pnr >> 1; |
| 401 | *pnr = vnr + n; |
| 402 | n = vnr; |
| 403 | } |
| 404 | nLeftNRcxx . . $ nLeftNR. = n; |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | |
| 409 | ///////////////////////////////////////////////////////////////// |
| 410 | // Clean DSP Effects interface |
| 411 | |
| 412 | // [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms] |
| 413 | BOOLcxx . . $ BOOL# CSoundFilecxx . . $ CSoundFile#::SetReverbParameterscxx . . $ CSoundFile#SetReverbParameters(8e1b545ea3aecce3).(UINTcxx . . $ UINT# nDepth, UINTcxx . . $ UINT# nDelay) |
| 414 | //------------------------------------------------------------ |
| 415 | { |
| 416 | if (nDepth > 100) nDepth = 100; |
| 417 | UINTcxx . . $ UINT# gain = nDepth / 20; |
| 418 | if (gain > 4) gain = 4; |
| 419 | m_nReverbDepthcxx . . $ CSoundFile#m_nReverbDepth. = 4 - gain; |
| 420 | if (nDelay < 40) nDelay = 40; |
| 421 | if (nDelay > 250) nDelay = 250; |
| 422 | m_nReverbDelaycxx . . $ CSoundFile#m_nReverbDelay. = nDelay; |
| 423 | return TRUEcxx . . $ `ext/psmplug/stdafx.h:97:9`!; |
| 424 | } |
| 425 | |
| 426 | |
| 427 | // [XBass level 0(quiet)-100(loud)], [cutoff in Hz 20-100] |
| 428 | BOOLcxx . . $ BOOL# CSoundFilecxx . . $ CSoundFile#::SetXBassParameterscxx . . $ CSoundFile#SetXBassParameters(8e1b545ea3aecce3).(UINTcxx . . $ UINT# nDepth, UINTcxx . . $ UINT# nRange) |
| 429 | //----------------------------------------------------------- |
| 430 | { |
| 431 | if (nDepth > 100) nDepth = 100; |
| 432 | UINTcxx . . $ UINT# gain = nDepth / 20; |
| 433 | if (gain > 4) gain = 4; |
| 434 | m_nXBassDepthcxx . . $ CSoundFile#m_nXBassDepth. = 8 - gain; // filter attenuation 1/256 .. 1/16 |
| 435 | UINTcxx . . $ UINT# range = nRange / 5; |
| 436 | if (range > 5) range -= 5; else range = 0; |
| 437 | if (nRange > 16) nRange = 16; |
| 438 | m_nXBassRangecxx . . $ CSoundFile#m_nXBassRange. = 21 - range; // filter average on 0.5-1.6ms |
| 439 | return TRUEcxx . . $ `ext/psmplug/stdafx.h:97:9`!; |
| 440 | } |
| 441 | |
| 442 | |
| 443 | // [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-50ms] |
| 444 | BOOLcxx . . $ BOOL# CSoundFilecxx . . $ CSoundFile#::SetSurroundParameterscxx . . $ CSoundFile#SetSurroundParameters(8e1b545ea3aecce3).(UINTcxx . . $ UINT# nDepth, UINTcxx . . $ UINT# nDelay) |
| 445 | //-------------------------------------------------------------- |
| 446 | { |
| 447 | UINTcxx . . $ UINT# gain = (nDepth * 16) / 100; |
| 448 | if (gain > 16) gain = 16; |
| 449 | if (gain < 1) gain = 1; |
| 450 | m_nProLogicDepthcxx . . $ CSoundFile#m_nProLogicDepth. = gain; |
| 451 | if (nDelay < 4) nDelay = 4; |
| 452 | if (nDelay > 50) nDelay = 50; |
| 453 | m_nProLogicDelaycxx . . $ CSoundFile#m_nProLogicDelay. = nDelay; |
| 454 | return TRUEcxx . . $ `ext/psmplug/stdafx.h:97:9`!; |
| 455 | } |
| 456 | |
| 457 | BOOLcxx . . $ BOOL# CSoundFilecxx . . $ CSoundFile#::SetWaveConfigExcxx . . $ CSoundFile#SetWaveConfigEx(dde2bda68385446b).(BOOLcxx . . $ BOOL# bSurround,BOOLcxx . . $ BOOL# bNoOverSampling,BOOLcxx . . $ BOOL# bReverb,BOOLcxx . . $ BOOL# hqido,BOOLcxx . . $ BOOL# bMegaBass,BOOLcxx . . $ BOOL# bNR,BOOLcxx . . $ BOOL# bEQ) |
| 458 | //---------------------------------------------------------------------------------------------------------------------------- |
| 459 | { |
| 460 | DWORDcxx . . $ DWORD# d = gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. & ~(SNDMIX_SURROUNDcxx . . $ `ext/psmplug/sndfile.h:262:9`! | SNDMIX_NORESAMPLINGcxx . . $ `ext/psmplug/sndfile.h:259:9`! | SNDMIX_REVERBcxx . . $ `ext/psmplug/sndfile.h:263:9`! | SNDMIX_HQRESAMPLERcxx . . $ `ext/psmplug/sndfile.h:260:9`! | SNDMIX_MEGABASScxx . . $ `ext/psmplug/sndfile.h:261:9`! | SNDMIX_NOISEREDUCTIONcxx . . $ `ext/psmplug/sndfile.h:257:9`! | SNDMIX_EQcxx . . $ `ext/psmplug/sndfile.h:264:9`!); |
| 461 | if (bSurround) d |= SNDMIX_SURROUNDcxx . . $ `ext/psmplug/sndfile.h:262:9`!; |
| 462 | if (bNoOverSampling) d |= SNDMIX_NORESAMPLINGcxx . . $ `ext/psmplug/sndfile.h:259:9`!; |
| 463 | if (bReverb) d |= SNDMIX_REVERBcxx . . $ `ext/psmplug/sndfile.h:263:9`!; |
| 464 | if (hqido) d |= SNDMIX_HQRESAMPLERcxx . . $ `ext/psmplug/sndfile.h:260:9`!; |
| 465 | if (bMegaBass) d |= SNDMIX_MEGABASScxx . . $ `ext/psmplug/sndfile.h:261:9`!; |
| 466 | if (bNR) d |= SNDMIX_NOISEREDUCTIONcxx . . $ `ext/psmplug/sndfile.h:257:9`!; |
| 467 | if (bEQ) d |= SNDMIX_EQcxx . . $ `ext/psmplug/sndfile.h:264:9`!; |
| 468 | gdwSoundSetupcxx . . $ CSoundFile#gdwSoundSetup. = d; |
| 469 | InitPlayercxx . . $ CSoundFile#InitPlayer(efaadfb7dc14930a).(FALSEcxx . . $ `ext/psmplug/stdafx.h:93:9`!); |
| 470 | return TRUEcxx . . $ `ext/psmplug/stdafx.h:97:9`!; |
| 471 | } |