| 178 | } |
| 179 | |
| 180 | int init() { |
| 181 | pars = inargs[4]; |
| 182 | fils = inargs[5]; |
| 183 | if (pars > fils) |
| 184 | std::swap(pars, fils); |
| 185 | if (pars > 1) { |
| 186 | pars = rpow2(pars); |
| 187 | fils = rpow2(fils) * 2; |
| 188 | ffts = pars * 2; |
| 189 | fwd = csound->fft_setup(ffts, FFT_FWD); |
| 190 | inv = csound->fft_setup(ffts, FFT_INV); |
| 191 | out.allocate(csound, ffts); |
| 192 | insp.allocate(csound, fils); |
| 193 | irsp.allocate(csound, fils); |
| 194 | saved.allocate(csound, pars); |
| 195 | ir.allocate(csound, fils); |
| 196 | in.allocate(csound, fils); |
| 197 | itnsp = insp.begin(); |
| 198 | itrsp = irsp.begin(); |
| 199 | n = 0; |
| 200 | } else { |
| 201 | ir.allocate(csound, fils); |
| 202 | in.allocate(csound, fils); |
| 203 | } |
| 204 | itn = in.begin(); |
| 205 | itr = ir.begin(); |
| 206 | return OK; |
| 207 | } |
| 208 | |
| 209 | int pconv() { |
| 210 | csnd::AudioSig insig(this, inargs(0)); |