Lines Matching refs:volume
39 * by a volume gain, with the formula:
43 * The output, input, and volume may have different types.
51 * Volume type TV: int32_t (U4.28) or int16_t (U4.12) or float [-1,1]
58 inline TO MixMul(TI value, TV volume) {
62 return value * volume;
66 inline int32_t MixMul<int32_t, int16_t, int16_t>(int16_t value, int16_t volume) {
67 return value * volume;
71 inline int32_t MixMul<int32_t, int32_t, int16_t>(int32_t value, int16_t volume) {
72 return (value >> 12) * volume;
76 inline int32_t MixMul<int32_t, int16_t, int32_t>(int16_t value, int32_t volume) {
77 return value * (volume >> 16);
81 inline int32_t MixMul<int32_t, int32_t, int32_t>(int32_t value, int32_t volume) {
82 return (value >> 12) * (volume >> 16);
86 inline float MixMul<float, float, int16_t>(float value, int16_t volume) {
88 return value * volume * norm;
92 inline float MixMul<float, float, int32_t>(float value, int32_t volume) {
94 return value * volume * norm;
98 inline int16_t MixMul<int16_t, float, int16_t>(float value, int16_t volume) {
99 return clamp16_from_float(MixMul<float, float, int16_t>(value, volume));
103 inline int16_t MixMul<int16_t, float, int32_t>(float value, int32_t volume) {
104 return clamp16_from_float(MixMul<float, float, int32_t>(value, volume));
108 inline float MixMul<float, int16_t, int16_t>(int16_t value, int16_t volume) {
110 return static_cast<float>(value) * static_cast<float>(volume) * norm;
114 inline float MixMul<float, int16_t, int32_t>(int16_t value, int32_t volume) {
116 return static_cast<float>(value) * static_cast<float>(volume) * norm;
120 inline int16_t MixMul<int16_t, int16_t, int16_t>(int16_t value, int16_t volume) {
121 return clamp16(MixMul<int32_t, int16_t, int16_t>(value, volume) >> 12);
125 inline int16_t MixMul<int16_t, int32_t, int16_t>(int32_t value, int16_t volume) {
126 return clamp16(MixMul<int32_t, int32_t, int16_t>(value, volume) >> 12);
130 inline int16_t MixMul<int16_t, int16_t, int32_t>(int16_t value, int32_t volume) {
131 return clamp16(MixMul<int32_t, int16_t, int32_t>(value, volume) >> 12);
135 inline int16_t MixMul<int16_t, int32_t, int32_t>(int32_t value, int32_t volume) {
136 return clamp16(MixMul<int32_t, int32_t, int32_t>(value, volume) >> 12);
139 /* Required for floating point volume. Some are needed for compilation but
144 inline float MixMul<float, float, float>(float value, float volume) {
145 return value * volume;
149 inline float MixMul<float, int16_t, float>(int16_t value, float volume) {
151 return value * volume * float_from_q_15;
155 inline int32_t MixMul<int32_t, int32_t, float>(int32_t value, float volume) {
157 return value * volume;
161 inline int32_t MixMul<int32_t, int16_t, float>(int16_t value, float volume) {
164 return value * volume * u4_12_from_float;
168 inline int16_t MixMul<int16_t, int16_t, float>(int16_t value, float volume) {
170 return value * volume;
174 inline int16_t MixMul<int16_t, float, float>(float value, float volume) {
176 return value * volume * q_15_from_float;
220 inline TO MixMulAux(TI value, TV volume, TA *auxaccum) {
222 return MixMul<TO, TI, TV>(value, volume);
226 * are mixed with volume gain into the output frame.
246 * vol: represents a volume array.
256 * vol: represents volume array.
265 * vol: represents a volume array.
270 * Same as MIXTYPE_MULTI, but uses only volume[0].
273 * Same as MIXTYPE_MULTI_SAVEONLY, but uses only volume[0].