Lines Matching refs:TO
10 * Unless required by applicable law or agreed to in writing, software
23 * false otherwise. Identical to the STL std::is_same.
38 /* MixMul is a multiplication operator to scale an audio input signal
49 * Output type TO: int32_t (Q4.27) or int16_t (Q.15) or float [-1,1]
53 * For high precision audio, only the <TO, TI, TV> = <float, float, float>
54 * needs to be accelerated. This is perhaps the easiest form to do quickly as well.
56 * A generic version is NOT defined to catch any mistake of using it.
59 template <typename TO, typename TI, typename TV>
60 TO MixMul(TI value, TV volume);
176 * MixAccum is used to add into an accumulator register of a possibly different
177 * type. The TO and TI types are the same as MixMul.
180 template <typename TO, typename TI>
181 inline void MixAccum(TO *auxaccum, TI value) {
182 if (!is_same<TO, TI>::value) {
184 sizeof(TO), sizeof(TI));
215 template <typename TO, typename TI, typename TV, typename TA>
216 inline TO MixMulAux(TI value, TV volume, TA *auxaccum) {
218 return MixMul<TO, TI, TV>(value, volume);
221 /* MIXTYPE is used to determine how the samples in the input frame
239 * TO: int32_t (Q4.27) or float
248 * TO: int32_t (Q4.27) or float
258 * TO: int16_t (Q.15) or float
274 typename TO, typename TI, typename TV, typename TA, typename TAV>
275 inline void volumeRampMulti(TO* out, size_t frameCount,
287 *out++ += MixMulAux<TO, TI, TV, TA>(*in++, vol[i], &auxaccum);
293 *out++ += MixMulAux<TO, TI, TV, TA>(*in, vol[i], &auxaccum);
300 *out++ = MixMulAux<TO, TI, TV, TA>(*in++, vol[i], &auxaccum);
306 *out++ += MixMulAux<TO, TI, TV, TA>(*in++, vol[0], &auxaccum);
312 *out++ = MixMulAux<TO, TI, TV, TA>(*in++, vol[0], &auxaccum);
329 *out++ += MixMul<TO, TI, TV>(*in++, vol[i]);
335 *out++ += MixMul<TO, TI, TV>(*in, vol[i]);
342 *out++ = MixMul<TO, TI, TV>(*in++, vol[i]);
348 *out++ += MixMul<TO, TI, TV>(*in++, vol[0]);
354 *out++ = MixMul<TO, TI, TV>(*in++, vol[0]);
367 typename TO, typename TI, typename TV, typename TA, typename TAV>
368 inline void volumeMulti(TO* out, size_t frameCount,
380 *out++ += MixMulAux<TO, TI, TV, TA>(*in++, vol[i], &auxaccum);
385 *out++ += MixMulAux<TO, TI, TV, TA>(*in, vol[i], &auxaccum);
391 *out++ = MixMulAux<TO, TI, TV, TA>(*in++, vol[i], &auxaccum);
396 *out++ += MixMulAux<TO, TI, TV, TA>(*in++, vol[0], &auxaccum);
401 *out++ = MixMulAux<TO, TI, TV, TA>(*in++, vol[0], &auxaccum);
416 *out++ += MixMul<TO, TI, TV>(*in++, vol[i]);
421 *out++ += MixMul<TO, TI, TV>(*in, vol[i]);
427 *out++ = MixMul<TO, TI, TV>(*in++, vol[i]);
432 *out++ += MixMul<TO, TI, TV>(*in++, vol[0]);
437 *out++ = MixMul<TO, TI, TV>(*in++, vol[0]);