[Openal] Samples normalization

Fruskus karlonchiz at hotmail.com
Fri Jul 3 06:44:31 PDT 2009




Daniel PEACOCK wrote:
> 
> 
> Hi,
> 
> When ever you are processing audio in a way that means there is a chance
> for a sample to exceed the range of signed short, then you need to
> temporarily convert the samples into some other format (e.g signed longs
> or
> floats).  After processing is completed, you should clamp the values into
> the allowable range (-32768 to 32767) and convert the samples back to
> signed shorts.   This may introduce clipping, but that is better than the
> alternative of overflows where the most significant bits of the magnitude
> are lost.
> 
> Dan
> Creative Labs (UK) Ltd.
> 
>              Fruskus                                                       
>                                                                           
>                                                                           
> 
> 
> 
> 
> 
> Hi, this is the first time I post here.
> 
> First of all, I'd like to thank all of you, because this forum has been
> really helpful to me.
> 
> I'm doing a real time filtering application. So I'm using the capturing
> and
> playing with queue routine. But when I modify the buffer, values may
> exceed
> the short max values.
> 
> Does anyone know how to normalizate buffers in realtime? I've tried to use
> a
> normalization loop, but I think this only work for a whole file, not for
> streaming.
> 
> Thanks in advance.
> 
> 
> 

Thanks Dan, that was what I was doing, and it works. But I was just
wondering If there was a better way to do this, and avoid the variations
between the differents buffers signal level.


-- 
View this message in context: http://www.nabble.com/Samples-normalization-tp24322038p24323376.html
Sent from the OpenAL - User mailing list archive at Nabble.com.



More information about the Openal mailing list