[Openal-devel] extracting wav samples from a buffer

Daniel PEACOCK dpeacock at creativelabs.com
Tue Dec 2 02:32:03 PST 2008





Hi,

You will need some code to parse a wavefile (i.e read the header to
determine the format of the sample data, and then the location of the
actual samples).   Once you know that information, you can indeed just use
something like fread() to pull in chunks of audio data.

If you have the OpenAL for Windows SDK (
http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx )
there is an example project called PlayStream that does everything you need
- except for putting the audio data through the convolution EQ effect -
which you can do just after reading the chunk of audio data from disk, and
before putting it in an OpenAL Buffer.

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.




                                                                           
             jeffmo77                                                      
             <jeffmo77 at gmail.c                                             
             om>                                                        To 
             Sent by:                  openal-devel at opensource.creative.co 
             openal-devel-boun         m                                   
             ces at opensource.cr                                          cc 
             eative.com                                                    
                                                                   Subject 
                                       [Openal-devel] extracting wav       
             11/27/2008 05:24          samples from a buffer               
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





I'm fairly new to OpenAL.  I'm streaming some basic *.wav audio data using
4
buffers at a time of size 1024 each.  I'd like to apply some convolution EQ
filtering on the audio, but the code I'm trying to use processes the data
on
a per audio sample basis.

Can somebody help me figure out how to sequentially read out each
individual
sample and process it before stuffing it back into the buffer?  All this
should happen just prior to the queue for playback.

should I be using fread()?

Thanks
--
View this message in context:
http://www.nabble.com/extracting-wav-samples-from-a-buffer-tp20715546p20715546.html

Sent from the OpenAL - Dev mailing list archive at Nabble.com.

_______________________________________________
Openal-devel mailing list
Openal-devel at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal-devel

ForwardSourceID:NT000675FA



More information about the Openal-devel mailing list