« Return to Thread: Samples normalization

Re: Samples normalization

by Daniel PEACOCK :: Rate this Message:

Reply to Author | View in Thread





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.

Notice
The information in this message is confidential and may be legally
privileged.  It is intended solely for the addressee.  Access to this
message by anyone else is unauthorized.  If you are not the intended
recipient,  any disclosure,  copying or distribution of the message,  or
any action taken by you in reliance on it,  is prohibited and may be
unlawful.  If you have received this message in error,  please delete it
and contact the sender immediately.  Thank you.

Creative Labs UK Ltd company number 2658256 registered in England and Wales
at Belmont Road, Belmont Place, Maidenhead, Berkshire, SL6 6TB



                                                                           
             Fruskus                                                      
             <karlonchiz@hotma                                            
             il.com>                                                    To
             Sent by:                  openal@...      
             openal-bounces@op                                          cc
             ensource.creative                                            
             .com                                                  Subject
                                       [Openal] Samples normalization      
                                                                           
             07/03/2009 01:03                                              
             PM                                                            
                                                                           
                                                                           
                                                                           





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.
--
View this message in context:
http://www.nabble.com/Samples-normalization-tp24322038p24322038.html
Sent from the OpenAL - User mailing list archive at Nabble.com.

_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

ForwardSourceID:NT0006DBEE

_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

 « Return to Thread: Samples normalization