Hi,

I’m trying to detect whether any of a given device’s input streams is active, 
while ignoring any activity on the output streams. (In my use case, another app 
uses the device, not my process.)

I used HALLab from the Audio Tools for Xcode to see if there’s anything that I 
can use. Unfortunately, when I start recording or playing back some audio 
through the device, HALLab’s “Notifications” tab for a given device only shows 
the “oink” a.k.a. kAudioDevicePropertyDeviceIsRunningSomewhere *device* 
notification, but no *stream* notifications at all. Stream notifications seem 
to only be caused by stream configuration changes.

Besides, the kAudioDevicePropertyDeviceIsRunningSomewhere property is not what 
I want because that just tells me whether the *device* is in use, but I can’t 
seem to find out which of its *streams* are actually active.

There’s kAudioStreamPropertyIsActive that sounds promising because the comments 
in AudioHardwareBase.h say that “[…] a non-zero value indicates that the stream 
is enabled and doing IO.” Surprisingly, I can’t find that property represented 
anywhere in HALLab. Also, when I query that property in my code, it’s always 1 
for any stream on any device I tested with, even if no recording or playback is 
happening.

Is this doable at all using Core Audio (or any other API, for that matter)? Is 
there something obvious that I’m missing?

Thanks in advance!

Cheers,

Marco
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to