AudioConverterFillComplexBuffer for transcoding streamed audio [iMac OSX10.5.6]
AudioConverterFillComplexBuffer for transcoding streamed audio [iMac OSX10.5.6]
- Subject: AudioConverterFillComplexBuffer for transcoding streamed audio [iMac OSX10.5.6]
- From: Abhinav Tyagi <email@hidden>
- Date: Thu, 10 Jun 2010 03:29:12 +0530
Hi all,
I am using AudioConverterFillComplexBuffer to transcode incoming data
to WAVE. I ahve following doubts:
1) I have noticed that the header is 4096 bytes if we use
AudioFileWritePackets. I remember the header for RIFF wave file is
only 44 bytes. Why is the header 4096 bytes.
2) I am having transcoded audio slightly choppy:
My procedure for transcoding is based on taking a file from disk and
transcoding it to a wave file on disk. So I write about 32KB data to a
file and feed it to transcoder to give WAVE file. from this wave file,
i read the data and put it in memory buffe for transmitting to other
device.
However i noticed that the stream is continuous but the wave file has
lots of zeros in the beginning of the data portion. if i read whole
wave file data from 4096+ byte till end and buffer it, its horribly
choppy when played on device. In case if i omit the ZEROs from after
'data' tag till non zero samples occur, the audio seems to be fine
mostly however sometimes its slightly choppy. Also as the song is
played on the device, the wave buffered size reduces even though i am
writing data to buffer after transcoding.
It seems like the Output Wave is of less durationcompared to input
stream. Do anyone have any idea why choppiness is coming and why
buffer underrun is occuring??
3) What is the difference between
creating a new instance of converter each time when we have to
transcode the data
Vs
using the converterRef as class variable and creating it only
once when we start the transcoding of the streamed audio and using the
same converterref for successive transcoding of the data as it
arrives.
Which is better in case of transcoding streaming audio.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden