RE: AUHAL Full duplex issues
RE: AUHAL Full duplex issues
- Subject: RE: AUHAL Full duplex issues
- From: "Aridis-Lang, Simon" <email@hidden>
- Date: Wed, 11 Aug 2010 14:38:18 +1000
- Thread-topic: AUHAL Full duplex issues
Title: RE: AUHAL Full duplex issues
Thank you for the response.
By IOBufferFrameSize I expect you are referring to kAudioDevicePropertyBufferFrameSize? There is no IOBufferFrameSize in any CoreAudio headers.
... and I apologise for my ignorance, but I don't understand why if the AUHAL is an audio unit, and my 'IOProc' is registered on the audio unit, why an audio unit property is the wrong answer? Could you elaborate on how the AUHAL abstracts the HAL and how these two settings interact (is one ignored? is it the minimum / maximum of the two?). A lot of example code out in the wild is setting both so it would help to understand why others have settled on this arrangement.
Either way, setting this value for me does not result in the correct frame size for the device in question (it is the only one mind you, all the other devices are fine). If I set the frame size to e.g. 256, and then read it back, it reads 256, however the AUHAL's IOProc is asking for e.g. 279 frames.
I am currently setting :
{
kAudioDevicePropertyFrameSize,
kAudioDevicePropertyScopeGlobal.
kAudioDevicePropertyElementMaster
}
I have also tried combinations of scope, and in conjunction with MaxFramesPerSlice with no success.
-----Original Message-----
From: William Stewart [mailto:email@hidden]
Sent: Tue 10/08/2010 3:39 AM
To: Aridis-Lang, Simon
Cc: email@hidden
Subject: Re: AUHAL Full duplex issues
Devices do not honour "MaxFramesPerSlice" - this is an audio unit property. You can control the IO Size of a device by the use of the AudioDevice property - IOBufferFrameSize (see CoreAudio/AudioHardware.h)
On Aug 8, 2010, at 5:11 PM, Aridis-Lang, Simon wrote:
> I think I've solved problem 1 at least. I didn't think to use the input bus on AudioUnitRender rather than just passing in the bus defined in the callback.
>
> From: Aridis-Lang, Simon
> Sent: Friday, 6 August 2010 1:24 PM
> To: email@hidden
> Subject: AUHAL Full duplex issues
>
>
> Hi,
>
> I'm having some trouble configuring an AUHAL device for full duplex operation. I have simplex built-in devices working well on a MBP, however some of my USB interfaces are presenting errors when calling AudioUnitRender.
>
> My callbacks are configured as a kAudioUnitProperty_SetRenderCallback for scope 0 for simplex output and full duplex, and a kAudioOutputUnitProperty_SetInputCallback for scope 1 for simplex input devices.
>
> Is this correct or do I need to register a callback for the input side as well and use bus numbers to determine which direction the unit is processing? I've found the TN for input configuration on an AUHAL, but can't find anything that talks about full duplex cases.
>
> When I call AudioUnitRender I'm getting results varying from -50 (MOTU UltraLite Mk3) to a recursive call to the callback and a stack overflow!! (M-Audio Fast Track Ultra).
>
> Also, one of my devices (an ESI U46) is not honouring calls to kAudioUnitProperty_MaximumFramesPerSlice, instead calling back with more frames than specified. Are there more steps to ensuring I get a callback with a fixed (or maximum) number of frames? Or do I need to realloc the AudioBuffer to fit the number of frames?
>
> Regards,
> Simon.
>
>
> _______________________________________________
> 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
_______________________________________________
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