MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / clip

Function clip

extlibs/soloud/src/audiosource/speech/klatt.cpp:177–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175};
176
177static short clip(float input)
178{
179 int temp = (int)input;
180 /* clip on boundaries of 16-bit word */
181
182 if (temp < -32767)
183 {
184 //assert?
185 temp = -32767;
186 }
187 else
188 if (temp > 32767)
189 {
190 //assert?
191 temp = 32767;
192 }
193
194 return (short)(temp);
195}
196
197/* Convert from decibels to a linear scale factor */
198static float DBtoLIN(int dB)

Callers 2

mix_internalMethod · 0.85
parwaveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected