Re: AudioConverter fails on SRC when formats are float -> float
Re: AudioConverter fails on SRC when formats are float -> float
- Subject: Re: AudioConverter fails on SRC when formats are float -> float
- From: Holger Hoerich <email@hidden>
- Date: Tue, 14 Oct 2003 22:01:45 +0200
- Organization: Coding Technologies
Hi Bill,
thanks for the quick response. See more details below...
William Stewart wrote:
>
> but the the float to float with sample rate conversion the decoder is
>
> called everytime the render function is called but should be called
>
> only every 4th time (?)
>
>
>
No - the output unit will only ask you for as much data as is needed to
>
be produced for that given slice of audio output for the device. You
>
also can't give it *more* (AU's are essentially in this usage modeling
>
real-time behaviour)
I'm not sure if I understand, I'm giving the converter more data than
requested and it works fine for many setups, at least when providing
SInt16 data. I understood that it can handle more data but not less then
requested.
>
>
I'm not sure that I completely follow your signal chain construction -
>
but the converter will buffer data internally, and only ask for data
>
when it has no more input to process - this is driven by the output
>
side of the converter (ie. how much data you ask it to produce)
>
This is the behavior I expect, but not recieve. I don't know what I'm
doing wrong. In fact the callback registered with
AudioConverterFillBuffer()--lets name it DecoderProc()--is called after
every call to AudioConverterFillBuffer(). Although it provided 2048
samples to the converter and gets called every 512 samples.
I have placed some printfs in the code. I attached a very small snipped
of the output. It tells the outDataBytes at the beginning and the end of
DecoderProc() and watches the audio formats. It also prints the renderer
(the proc called from the AudioOutputUnit where the
AudioConverterFillBuffer() is called).
I'd be grateful if you'd have a quick look,
Holger
MAIN: Input format: Fs 32000, ID 1819304813, Fl 0xb, BpP 8, FpP 1, BpF 8, CpF 2, bpC 32, Res 0
MAIN: Output format: Fs 44100, ID 1819304813, Fl 0xb, BpP 8, FpP 1, BpF 8, CpF 2, bpC 32, Res 32
RENDERER: Action Flags 0, Time Stamp 0.000000 (valid 1)
DECODER: Bytes: 3040; Fs 32000; BytesPerFrame 8
DECODER: Input format: Fs 32000, ID 1819304813, Fl 0xb, BpP 8, FpP 1, BpF 8, CpF 2, bpC 32, Res 0
DECODER: Bytes: 16384 written
RENDERER: Action Flags 0, Time Stamp 512.000000 (valid 1)
DECODER: Bytes: 2976; Fs 32000; BytesPerFrame 8
DECODER: Input format: Fs 32000, ID 1819304813, Fl 0xb, BpP 8, FpP 1, BpF 8, CpF 2, bpC 32, Res 0
DECODER: Bytes: 16384 written
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.