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.
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 )
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
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?
Forum posts: 44
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
Forum posts: 31
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
Forum posts: 44
Thanks ranjeet for your add!! Here the link with full description about wave file format. Just for reference
http://www.borg.com/~jglatt/tech/wave.htm
Forum posts: 70
Forum posts: 70
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