On Oct 13, 2009, at 3:58 PM, Doug Wyatt wrote:
If it's an AppleAU on the desktop (check), and you're on
SnowLeopard (I don't know), then this error is generated by the AU
when it pulls for input and discovers that it was given a NULL
buffer in its input buffer list. That's the only place I can see
this being generated on the render path.
I am on 10.6.1. The ABL that's passed into AudioUnitRender looks
like this at runtime:
(gdb) p *audioBuffer->mAudioBufferList
$1 = {
mNumberBuffers = 2,
mBuffers = {{
mNumberChannels = 1,
mDataByteSize = 5036,
mData = 0x205fe00
}}
}
(gdb) p audioBuffer->mAudioBufferList.mBuffers[1]
$2 = {
mNumberChannels = 1,
mDataByteSize = 5036,
mData = 0x215b000
}
So, nothing NULL in the input ABL. Also, the output unit is
claiming its max frames per slice is 1259.
The problem appears to be localized to when the Generic Output unit
has a sample rate >44100Hz (I've tested 48kHz, 96kHz) on its input
scope, and 44100Hz on its output scope.
If the input scope's rate is 44100Hz or lower (I've tested 8kHz and
a few others so far with success), this all works just fine.
Here's what CAShow says for my graph with an 8kHz source (which
works successfully):
AudioUnitGraph 0x69F5003:
Member Nodes:
node 1: 'aufc' 'tmpt' 'appl', instance 0x830000 O I
node 2: 'aumx' 'smxr' 'appl', instance 0x810001 O I
node 4: 'aufx' 'greq' 'appl', instance 0x810003 O I
node 5: 'auou' 'genr' 'appl', instance 0x820002 O I
Connections:
node 4 bus 0 => node 1 bus 0 [1 ch, 8000 Hz]
node 2 bus 0 => node 5 bus 0 [2 ch, 8000 Hz]
Input Callbacks:
{0x356ad, 0x360eea0} => node 2 bus 0 [1 ch, 8000 Hz]
{0x3511f, 0x360eea0} => node 2 bus 1 [1 ch, 8000 Hz]
CurrentState:
mLastUpdateError=0, eventsToProcess=F, isRunning=F
And for a 44100kHz source (also successful):
AudioUnitGraph 0x69F5011:
Member Nodes:
node 1: 'aufc' 'tmpt' 'appl', instance 0x830011 O I
node 2: 'aumx' 'smxr' 'appl', instance 0x830012 O I
node 4: 'aufx' 'greq' 'appl', instance 0x810014 O I
node 5: 'auou' 'genr' 'appl', instance 0x820013 O I
Connections:
node 4 bus 0 => node 1 bus 0 [2 ch, 44100 Hz]
node 2 bus 0 => node 5 bus 0 [2 ch, 44100 Hz]
Input Callbacks:
{0x356ad, 0x38573a0} => node 2 bus 0 [2 ch, 44100 Hz]
{0x3511f, 0x38573a0} => node 2 bus 1 [2 ch, 44100 Hz]
CurrentState:
mLastUpdateError=0, eventsToProcess=F, isRunning=F
Finally, a broken 48kHz source:
AudioUnitGraph 0x69F501E:
Member Nodes:
node 1: 'aufc' 'tmpt' 'appl', instance 0x83001d O I
node 2: 'aumx' 'smxr' 'appl', instance 0x81001e O I
node 4: 'aufx' 'greq' 'appl', instance 0x810020 O I
node 5: 'auou' 'genr' 'appl', instance 0x82001f O I
Connections:
node 4 bus 0 => node 1 bus 0 [2 ch, 48000 Hz]
node 2 bus 0 => node 5 bus 0 [2 ch, 48000 Hz]
Input Callbacks:
{0x356ad, 0x15161aa0} => node 2 bus 0 [2 ch, 48000 Hz]
{0x3511f, 0x15161aa0} => node 2 bus 1 [2 ch, 48000 Hz]
CurrentState:
mLastUpdateError=0, eventsToProcess=F, isRunning=F
The call to CAShow() is made just after I swap the DefaultOutput
unit with the GenericOutput unit, and initialize the AUGraph.
Thanks,
Chris Liscio
http://supermegaultragroovy.com
Learn _your_ music with Capo: http://capoapp.com