Audio Unit render problem
Audio Unit render problem
- Subject: Audio Unit render problem
- From: Russell Edwards <email@hidden>
- Date: Mon, 14 May 2007 18:21:04 +0100
Hi All
I have come across a problem with the render method of an Audio Unit
MIDI Effect that i am building. The effect fails validation with AUVal.
AUVal returns the following:
RENDER TESTS:
Input Format: AudioStreamBasicDescription: 2 ch, 44100 Hz,
'lpcm' (0x0000002B) 32-bit big-endian float, deinterleaved
Output Format: AudioStreamBasicDescription: 2 ch, 44100 Hz,
'lpcm' (0x0000002B) 32-bit big-endian float, deinterleaved
Render Test at 512 frames
ERROR: -1 IN CALL AudioUnitRender
* * FAIL
As i am currently experimenting to get the hang of AUs, and in
particular MIDI Effects, the render method / function that i have
been testing should just copy the data from the input to the output
without any DSP.
ComponentResult SwellSym::Render(AudioUnitRenderActionFlags&
ioActionFlags,
const AudioTimeStamp& inTimeStamp,
UInt32 inNumberFrames
)
{
//The DSP code goes here.
//the default format is float32 non-interleaved linear so we will
use that as a starting point.
AudioBufferList inList;
AudioBufferList outList;
Float32 *inDataArray;
Float32 *outDataArray;
//get the buffer list for the input and output.
inList = GetInput(0)->GetBufferList();
outList = GetOutput(0)->GetBufferList();
//for each of the buffers in the lists get the data and pass it to
the output.
for (UInt32 n = 0; n<inList.mNumberBuffers; n++)
{
inDataArray = (Float32 *)inList.mBuffers[n].mData; //get the
pointer to the array of data and cast it's void type to float32
outDataArray = (Float32 *)outList.mBuffers[n].mData; //get the
pointer to the array of data and cast it's void type to float32
for (UInt32 i=0; i<inNumberFrames; i++)
{
//copy each frame accross.
outDataArray[i] = inDataArray[i];
}
}
return noErr;
}
Can see where I have gone wrong?
As i said in my previous email, regarding this and another problem. I
couldn't find a reference in the AU documentation as to what the
return values should be, so i have just tried some common values
(hence the noErr) but with no luck.
Many Thanks
Russell Edwards
_______________________________________________
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