diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-20 22:31:20 +0100 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-21 16:30:07 +0100 |
commit | 74d6e04c21bddd435bd74c34dbe027b883772a76 (patch) | |
tree | 4221df9da5a17897296e5f7f841f01b1f6428c74 /src/atrac/atrac1_qmf.h | |
parent | 78649b2f5941e0649db960cafb2997b5ca432be1 (diff) | |
download | atracdenc-74d6e04c21bddd435bd74c34dbe027b883772a76.tar.gz |
[refactoring] Get rid of TFloat parameter. Use float.
Diffstat (limited to 'src/atrac/atrac1_qmf.h')
-rw-r--r-- | src/atrac/atrac1_qmf.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/atrac/atrac1_qmf.h b/src/atrac/atrac1_qmf.h index d8fdae3..0276160 100644 --- a/src/atrac/atrac1_qmf.h +++ b/src/atrac/atrac1_qmf.h @@ -28,18 +28,18 @@ class Atrac1AnalysisFilterBank { const static int delayComp = 39; TQmf<TIn, nInSamples> Qmf1; TQmf<TIn, nInSamples / 2> Qmf2; - std::vector<TFloat> MidLowTmp; - std::vector<TFloat> DelayBuf; + std::vector<float> MidLowTmp; + std::vector<float> DelayBuf; public: Atrac1AnalysisFilterBank() { MidLowTmp.resize(512); DelayBuf.resize(delayComp + 512); } - void Analysis(TIn* pcm, TFloat* low, TFloat* mid, TFloat* hi) { - memcpy(&DelayBuf[0], &DelayBuf[256], sizeof(TFloat) * delayComp); + void Analysis(TIn* pcm, float* low, float* mid, float* hi) { + memcpy(&DelayBuf[0], &DelayBuf[256], sizeof(float) * delayComp); Qmf1.Analysis(pcm, &MidLowTmp[0], &DelayBuf[delayComp]); Qmf2.Analysis(&MidLowTmp[0], low, mid); - memcpy(hi, &DelayBuf[0], sizeof(TFloat) * 256); + memcpy(hi, &DelayBuf[0], sizeof(float) * 256); } }; @@ -49,16 +49,16 @@ class Atrac1SynthesisFilterBank { const static int delayComp = 39; TQmf<TOut, nInSamples> Qmf1; TQmf<TOut, nInSamples / 2> Qmf2; - std::vector<TFloat> MidLowTmp; - std::vector<TFloat> DelayBuf; + std::vector<float> MidLowTmp; + std::vector<float> DelayBuf; public: Atrac1SynthesisFilterBank() { MidLowTmp.resize(512); DelayBuf.resize(delayComp + 512); } - void Synthesis(TOut* pcm, TFloat* low, TFloat* mid, TFloat* hi) { - memcpy(&DelayBuf[0], &DelayBuf[256], sizeof(TFloat) * delayComp); - memcpy(&DelayBuf[delayComp], hi, sizeof(TFloat) * 256); + void Synthesis(TOut* pcm, float* low, float* mid, float* hi) { + memcpy(&DelayBuf[0], &DelayBuf[256], sizeof(float) * delayComp); + memcpy(&DelayBuf[delayComp], hi, sizeof(float) * 256); Qmf2.Synthesis(&MidLowTmp[0], &low[0], &mid[0]); Qmf1.Synthesis(&pcm[0], &MidLowTmp[0], &DelayBuf[0]); } |