SDK's IsStreamFormatWritable bug?
SDK's IsStreamFormatWritable bug?
- Subject: SDK's IsStreamFormatWritable bug?
- From: Pavol Markovic <email@hidden>
- Date: Mon, 12 Jan 2004 09:53:59 +0100
When I pass MusicDevice plugin through AUValidation, I get
AssertMacros: , kAudioUnitErr_InvalidElement file:
/Volumes/Devel/Audio/LinPlug/RMIV/Source/ausdk/AUPublic/AUBase/
AUScopeElement.h, line: 379
In my opinion this is either AU SDK or AUValidation bug.
Our MusicDevice does not support InputScope - zero value for input bus
count is passed in constructor. I think developers should override
StreamFormatWritable method (so it's done also here), but
IsStreamFormatWritable is called before and this throws exception if
host asks for value in InputScope.
Here is SDK's source part:
bool AUBase::IsStreamFormatWritable( AudioUnitScope scope,
AudioUnitElement element)
{
switch (scope) {
case kAudioUnitScope_Input:
{
AUInputElement *input = GetInput(element);
if (input->HasConnection()) return false; // can't write format when
input comes from connection
}
// ... fall ...
case kAudioUnitScope_Output:
return StreamFormatWritable(scope, element);
AUValidation tries various M-N input-output channel combinations - but
MusicDevices generally don't have input channels, should I catch the
exception somewhere (I don't know where, because I don't call
IsStreamFormatWritable) ?. Or is this host (AUValidation) duty to catch
it?
Thanks.
Pavol Markovic
_______________________________________________
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.