Re: Multiple unexpected AudioConverterComplexInputDataProc invocations
Re: Multiple unexpected AudioConverterComplexInputDataProc invocations
- Subject: Re: Multiple unexpected AudioConverterComplexInputDataProc invocations
- From: James McCartney <email@hidden>
- Date: Thu, 16 Jun 2005 16:56:22 -0700
On Jun 16, 2005, at 7:05 AM, Heath Raftery wrote:
The problem I have is that after returning my custom error, the
InputDataProc is called 6 more times before the calling thread gets
the return value. This doesn't really cause any problems, because
the InputDataProc just returns its "not enough data" error again
each time. I'm just worried that maybe I've done something wrong,
or that I'm seeing something unusual. Or does the
AudioConverterFillComplexBuffer just give the
AudioConverterComplexInputDataProc a few chances to satisfy its
request before bubbling the error back up?
My log messages look something like this:
2005-06-16 23:33:33.167 AudioDebug[9226] About to call
AudioConverterFillComplexBuffer
//Logged from the calling thread
2005-06-16 23:33:33.167 AudioDebug[9226] InputDataProc wants 4028
packets
//Logged at the top of my InputDataProc.
//In this case there is not enough data available, so my custom
error value is returned
2005-06-16 23:33:33.167 AudioDebug[9226] InputDataProc wants 4028
packets
//But control is not returned to my calling thread, instead the
InputDataProc is called again
2005-06-16 23:33:33.167 AudioDebug[9226] InputDataProc wants 4028
packets
//And again
2005-06-16 23:33:33.167 AudioDebug[9226] InputDataProc wants 4028
packets
2005-06-16 23:33:33.172 AudioDebug[9226] InputDataProc wants 4028
packets
2005-06-16 23:33:33.172 AudioDebug[9226] InputDataProc wants 4028
packets
2005-06-16 23:33:33.172 AudioDebug[9226] InputDataProc wants 4028
packets
//Until the 7th time when...
2005-06-16 23:33:33.172 AudioDebug[9226] Not enough data, sleeping
for a bit.
//AudioConverterFillComplexBuffer returns with my custom error and
the threads sleeps for a bit
Is this to be expected, or am I missing something?
The converter should bail out as soon as it receives an error from
the input proc, returning the data, if any, that it has converted so
far. However some legacy SoundManager codecs are problematic and can
cause behavior problems. So at this point it may be a bug, I'm not
sure. I will look into this.
--- james mccartney -- apple coreaudio
_______________________________________________
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