MusicDevice problems with AUgraph hosts
MusicDevice problems with AUgraph hosts
- Subject: MusicDevice problems with AUgraph hosts
- From: Urs Heckmann <email@hidden>
- Date: Mon, 25 Nov 2002 21:16:52 +0100
Hi,
my MusicDevice has problems with hosts that utilize AUGraphs, namely
RAX and SynthTest (I guess). In SynthTest it produces a very annoying
jitter, in RAX it almost blew up my speakers. However it works fine
Logic 5.5 (built in audio). Is there anything special related to
outBuffers I have to take care of? (I don't write into interleaved
buffers, currently)
I do this in Render():
AUOutputElement *theOutput = GetOutput(0);
AudioBufferList &outBuffer = theOutput->GetBufferList();
UInt32 numChannels = outBuffer.mNumberBuffers;
...some checking...
float* output1 =(float*)(outBuffer.mBuffers[0].mData); // buffers I
write to
float* output2 =(float*)(outBuffer.mBuffers[1].mData); // If available
and this (with a bit copy/paste from Airy :-):
bool myAU::StreamFormatWritable( AudioUnitScope scope,
AudioUnitElement element) {return true;}
ComponentResult myAU::ChangeStreamFormat(
AudioUnitScope iScope,
AudioUnitElement iElem,
const CAStreamBasicDescription& sOld,
const CAStreamBasicDescription& sNew)
{
if (sOld.NumberChannels()!=sNew.NumberChannels()) {
const UInt32 iCha=sNew.NumberChannels();
if ((iCha>1) || (sNew.NumberInterleavedChannels()>1)) return
kAudioUnitErr_InvalidParameter;}
return AUBase::ChangeStreamFormat(iScope, iElem, sOld, sNew);
}
If this is okay, please check it out _carefully_ here (please, this is
NOT for public):
http://www.u-he.com/audiounits/zoyd.dmg (ctrl-click and save2disc)
Please let me know if it is a bug in my code or maybe a bug in
AUGraph?!?
Cheers (and have fun with that unfinished bastard),
;) Urs
urs heckmann
email@hidden
www.u-he.com
_______________________________________________
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.