audio data array - new question - array to wav

Login to reply to this topic.
Thu, 2005-07-28 01:28
Joined: 2005-02-16
Forum posts: 70
Hi,
I am wondering if there is a way in Symbian 7.0s or 8.0a to load audio data into an array of floats? I want to be able to read in a wav file and then put it into an array so that audio data can be manipulated.

Is this possible?

Thanks,
Miranda

Thu, 2005-07-28 05:07
Joined: 2004-12-30
Forum posts: 44
Re: audio data array
Just like  PC programming :

1 - U must have knowledge about wave file format :  It's has header and then audio data( Left chanel and right chanel)
2 - Using file server to open a Wave file like any other binary file.
3- Using the header to know if the wave file is :  mono or stereo ,  sample rate, bit per sample v.vv
4- Base on these information U can put  the audio data comming after the header in an array correctly and processing them in the way  U like.
5- U can also put the data processed back in the file again ( remember the header file )

It's the general way to processing a wave file
Thu, 2005-07-28 05:28
Joined: 2005-07-25
Forum posts: 31
Re: audio data array
Hi Miranda

just to add !!

Most often header of .wav file consists of 44 bytes, so you skip the first 44 bytes and then start reading the data in the .wav file, But the correct way to read the data is to travese from the start till you recive the
"D" "A" "T" "A" in the .wav file, As most often data is not found after the 44 bytes, so you have to search for the DATA, and one more thing most of the files also have the End User Data, in the end of the file, make sure that you dont read this data also thinking as the Audio Data,

To wrap up:

HEADER OF THE FILE (44 bytes)  DATA.................................. DATA  END HEADER OF THE FILE
genrally data is not find after 44 bytes, so you have to check for the DATA Character in the .wav file

Reagrds
Ranjeet
Thu, 2005-07-28 05:33
Joined: 2004-12-30
Forum posts: 44
Re: audio data array
Right!

Thanks ranjeet  for your add!! Here the link with full description about wave file format. Just for  reference  Grin

http://www.borg.com/~jglatt/tech/wave.htm
Thu, 2005-07-28 06:20
Joined: 2005-02-16
Forum posts: 70
Re: audio data array
thanks heaps!
Tue, 2005-08-09 08:06
Joined: 2005-02-16
Forum posts: 70
Re: audio data array - new question
ok, so now I have all my audio data in an array and have done what I need to with it. I now need to write it back to a wav file.

The audio data in stored in an RArray of TInts and the header data is stored in either a TBuf8 descriptor of a TInt, depending on the data it contains.

So how to I go about getting this back into a wav file? Do I need to convert it into descriptors and use CMdaAudioConvertUtility?

Thanks in advance,
Miranda
  • Login to reply to this topic.