| 1 | #cxx . . $ `<file>/nall/dsp/resample/cubic.hpp`/ifdef NALL_DSP_INTERNAL_HPPcxx . . $ `nall/dsp.hpp:11:9`! |
| 2 | |
| 3 | struct ResampleCubiccxx . . $ nall/ResampleCubic# : Resamplercxx . . $ nall/Resampler# { |
| 4 | inline void setFrequencycxx . . $ nall/ResampleCubic#setFrequency(49f6e7a06ebc5aa8).(); |
| 5 | inline void clearcxx . . $ nall/ResampleCubic#clear(49f6e7a06ebc5aa8).(); |
| 6 | inline void samplecxx . . $ nall/ResampleCubic#sample(49f6e7a06ebc5aa8).(); |
| 7 | ResampleCubiccxx . . $ nall/ResampleCubic#ResampleCubic(4d05a46e9b84fdde).(DSPcxx . . $ nall/DSP#& dsp) : Resamplercxx . . $ nall/Resampler#(dsp) {} |
| 8 | |
| 9 | realcxx . . $ `nall/dsp/core.hpp:10:9`! fractioncxx . . $ nall/ResampleCubic#fraction.; |
| 10 | realcxx . . $ `nall/dsp/core.hpp:10:9`! stepcxx . . $ nall/ResampleCubic#step.; |
| 11 | }; |
| 12 | |
| 13 | void ResampleCubiccxx . . $ nall/ResampleCubic#::setFrequencycxx . . $ nall/ResampleCubic#setFrequency(49f6e7a06ebc5aa8).() { |
| 14 | fractioncxx . . $ nall/ResampleCubic#fraction. = 0.0; |
| 15 | stepcxx . . $ nall/ResampleCubic#step. = dspcxx . . $ nall/Resampler#dsp..settingscxx . . $ nall/DSP#settings..frequencycxx . . $ nall/DSP#Settings#frequency. / frequencycxx . . $ nall/Resampler#frequency.; |
| 16 | } |
| 17 | |
| 18 | void ResampleCubiccxx . . $ nall/ResampleCubic#::clearcxx . . $ nall/ResampleCubic#clear(49f6e7a06ebc5aa8).() { |
| 19 | fractioncxx . . $ nall/ResampleCubic#fraction. = 0.0; |
| 20 | } |
| 21 | |
| 22 | void ResampleCubiccxx . . $ nall/ResampleCubic#::samplecxx . . $ nall/ResampleCubic#sample(49f6e7a06ebc5aa8).() { |
| 23 | while(fractioncxx . . $ nall/ResampleCubic#fraction. <= 1.0) { |
| 24 | realcxx . . $ `nall/dsp/core.hpp:10:9`! channel[dspcxx . . $ nall/Resampler#dsp..settingscxx . . $ nall/DSP#settings..channelscxx . . $ nall/DSP#Settings#channels.]; |
| 25 | |
| 26 | for(unsigned n = 0; n < dspcxx . . $ nall/Resampler#dsp..settingscxx . . $ nall/DSP#settings..channelscxx . . $ nall/DSP#Settings#channels.; n++) { |
| 27 | realcxx . . $ `nall/dsp/core.hpp:10:9`! a = dspcxx . . $ nall/Resampler#dsp..buffercxx . . $ nall/DSP#buffer..readcxx . . $ nall/DSP#Buffer#read(bd0dcd125246a5b7).(n, -3); |
| 28 | realcxx . . $ `nall/dsp/core.hpp:10:9`! b = dspcxx . . $ nall/Resampler#dsp..buffercxx . . $ nall/DSP#buffer..readcxx . . $ nall/DSP#Buffer#read(bd0dcd125246a5b7).(n, -2); |
| 29 | realcxx . . $ `nall/dsp/core.hpp:10:9`! c = dspcxx . . $ nall/Resampler#dsp..buffercxx . . $ nall/DSP#buffer..readcxx . . $ nall/DSP#Buffer#read(bd0dcd125246a5b7).(n, -1); |
| 30 | realcxx . . $ `nall/dsp/core.hpp:10:9`! d = dspcxx . . $ nall/Resampler#dsp..buffercxx . . $ nall/DSP#buffer..readcxx . . $ nall/DSP#Buffer#read(bd0dcd125246a5b7).(n, -0); |
| 31 | |
| 32 | realcxx . . $ `nall/dsp/core.hpp:10:9`! mu = fractioncxx . . $ nall/ResampleCubic#fraction.; |
| 33 | |
| 34 | realcxx . . $ `nall/dsp/core.hpp:10:9`! A = d - c - a + b; |
| 35 | realcxx . . $ `nall/dsp/core.hpp:10:9`! B = a - b - A; |
| 36 | realcxx . . $ `nall/dsp/core.hpp:10:9`! C = c - a; |
| 37 | realcxx . . $ `nall/dsp/core.hpp:10:9`! D = b; |
| 38 | |
| 39 | channel[n] = A * (mu * 3) + B * (mu * 2) + C * mu + D; |
| 40 | } |
| 41 | |
| 42 | dspcxx . . $ nall/Resampler#dsp..writecxx . . $ nall/DSP#write(e6881f009d13a851).(channel); |
| 43 | fractioncxx . . $ nall/ResampleCubic#fraction. += stepcxx . . $ nall/ResampleCubic#step.; |
| 44 | } |
| 45 | |
| 46 | dspcxx . . $ nall/Resampler#dsp..buffercxx . . $ nall/DSP#buffer..rdoffsetcxx . . $ nall/DSP#Buffer#rdoffset.++; |
| 47 | fractioncxx . . $ nall/ResampleCubic#fraction. -= 1.0; |
| 48 | } |
| 49 | |
| 50 | #endif |