Re: Listener for when stream formats change (Leopard)
Re: Listener for when stream formats change (Leopard)
- Subject: Re: Listener for when stream formats change (Leopard)
- From: Dave Fernandes <email@hidden>
- Date: Wed, 22 May 2013 00:15:52 -0400
Did you try kAudioStreamPropertyPhysicalFormat rather than kAudioStreamPropertyAvailablePhysicalFormats? The available formats may not have changed even though the current format has changed. Anyway, this works for me on Snow Leopard through ML. On Tiger and Leopard I was using the older API for adding listeners.
There is also kAudioDevicePropertyDataSource for data source changes.
Dave
On 2013-05-21, at 9:33 PM, Tim Hewett <email@hidden> wrote:
> I have software which needs a listener to be called when a device's stream formats change, e.g. when a data source changes. Adding a listener on the stream for kAudioStreamPropertyAvailablePhysicalFormats works fine under Mountain Lion but not Leopard or Snow Leopard (not tested under Lion) - it never gets called. HALLab behaves in the same way.
>
> I have tried adding a listener on the device for kAudioDevicePropertyStreamFormats (scope: global, element: first channel of stream), again the listener is never called.
>
> I am wondering if there is there a more reliable way to be notified of a change to the stream formats. Listening for kAudioDevicePropertyDeviceHasChanged seems to be an option, but this can be called for multiple reasons and it would be necessary to cache the stream's current available formats to determine whether or not the reason for being called is that the stream's formats have changed.
>
> Tim.
> _______________________________________________
> 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