AudioDriverKit

RSS for tag

Develop drivers for audio devices using AudioDriverKit.

AudioDriverKit Documentation

Posts under AudioDriverKit tag

8 results found
Sort by:
Post not yet marked as solved
33 Views

High CPU Usage for low latency USBDriverKit Audio Driver

I'm using USBDriverKit to write an audio driver for a High Speed USB device. In an attempt to understand the difference between DriverKit Extension and Kernel Extension latencies, I'm dispatching individual isochronous microframes that for this device each account for a duration 125µs, or 6 samples at 48kHz. I don't yet know what kind of latency I'm actually getting but I was surprised to see a high CPU usage of ~11% on a 512GB M1 mac mini running Big Sur 11.6. That's 8000 IsochIO() calls and 8000 completion callbacks per second. Instruments.app tells me that most of my time (60%) is being spent inside mach_msg, as part of a remote procedure call. Multiple questions occur to me: is this normal? should I expect lower CPU usage? isn't mach_msg blocking? shouldn't CPU usage be low? don't low latency audio folks avoid things like remote procedure calls? is seeking low latency throughput with USBDriverKit futile? does Monterey's AudioDriverKit enable lower latency, or is it a convenience API?
Asked Last updated
.
Post not yet marked as solved
47 Views

Block multiple devices

Hello, I rewriting a audio driver that was created in IOKit to a new one based on AudioDriverKit. I would like to block possibility to connect multiple devices to the computer so that driver support just one device. In IOKit it was done by overriding IOAudioEngine::getLocalUniqueID() method and I cannot find anything similar in AudioDriverKit (IOUserAudioDevice). Do you know how to do it? Best Regards
Asked
by slawek17.
Last updated
.
Post not yet marked as solved
70 Views

Dynamically creating Virtual Audio Driver devices

I have created virtual driver from Soundpusher as well as Null device packages, and the virtual microphone & speakers are working well with audio applications (Google meet, zoom etc..). Now, my problem is getting silence in capture/playout when my virtual driver application is stopped/ exited. The virtual driver application - read data /play data from/to actual mic/speaker. To handle this situation, I should either create the devices dynamically or set visibility dynamically (hidden/visible) using anyone of the parameters. Create virtual mic/speaker or set visibility to virtual mic/speaker if my virtual driver application is running Delete virtual mic/speaker or set invisibility to virtual mic/speaker if my virtual driver application is Not running/Stopped/Exited Since, I am new to this driver technology for MacOsx, I am struggling to add these features into my driver. It will be great, if anyone can provide some help on how to do create & delete the devices dynamically (OR) set visibility dynamically. Also provide any sample code if available. Thanks in Advance.
Asked
by Nswapna.
Last updated
.
Post not yet marked as solved
154 Views

DriverKit for Camera. Is Apple going to deliver something like CameraKit?

Apple presented how to Create audio drivers with DriverKit on the latest WWDC 2021. Video presentation: https://developer.apple.com/videos/play/wwdc2021/10190 Code sample: https://developer.apple.com/documentation/audiodriverkit/creating_an_audio_device_driver We need a similar approach for cameras. The audio driver mentioned above can be compiled using the new Xcode 13 beta. So this approach is in progress. We need to develop a custom driver for the camera. Is there a solution in DriverKit for cameras? Is it planned? Should we develop a driver from scratch using USBDriverKit? Any suggestions are appreciated.
Asked Last updated
.
Post not yet marked as solved
130 Views

How to implement and publish virtual audio driver to Apple App Store?

At 3:38-4:00 in the session video, it seems Baek San Chang says that AudioDriverKit will not be allowed to be used for virtual audio devices Video: https://developer.apple.com/videos/play/wwdc2021/10190/ Here is what he says: Keep in mind that the sample code presented is purely for demonstrative purposes and creates a virtual audio driver that is not associated with a hardware device, and so entitlements will not be granted for that kind of use case. For virtual audio driver, where device is all that is needed, the audio server plugin driver model should continue to be used. The mentioning of sample code is a little confusing; Does he mean the entitlements for hardware access won't be granted for a virtual device? That would seem obvious. But if he means the entitlements for driver kit extensions (com.apple.developer.driverkit and com.apple.developer.driverkit.allow-any-userclient-access) won't be granted for virtual audio devices, and this is why AudioServerPlugins should still be used, then that's another story. Are we allowed to use AudioDriverKit Extension for Virtual Devices? The benefit of having the extension bundled with the app rather than requiring an installer is a significant reason to use an extension if allowed. I need to create a virtual audio driver that presents a virtual microphone and a virtual speaker to the user. The user can then select these virtual endpoints in 3rd party audio communication apps like Skype, Zoom etc. The virtual audio driver implementation then routes audio between physical devices (selected by the user in the virtual driver userspace control app) and the virtual devices. It is a requirement that the virtual audio driver and its control app can be published to the Apple app store for users to download and install on their machine without any problems. How should I go about this?
Asked Last updated
.
Post marked as solved
407 Views

Where is darwinup to install SimpleAudioDriver in command line script?

Why would you employ a rarely used and practically inaccessible command, "darwinup", in a script that is part of sample code for the SimpleAudio project? I searched here in the developer content. I searched generally online. There is very little content for "darwinup". Albeit fun and necessary in SOME cases, practically speaking, no one has unlimited time to "get lost in the weeds" to comprehend the entire paradigm of absolutely every API by debugging sample code, particularly when tools are inaccessible. Not really sample code, now, is it? This enterprise is counterproductive. Forcing us to understand the newest API paradigms by strategically leaving certain information out is helpful, but not when it becomes a situation where resources that are not germane to the task are employed to create frustration just to create frustration. I feel as though there is a more sinister message being conveyed. It is not unlike a passive aggressive campaign. You say we can do things, but you also DELIBERATELY engineer the process that enables achievement such that achievement is not the outcome for everyone. Maybe some of us are seeing darwinup and others are not. Maybe you are choosing who is able to get certain tools. It is clear that every running instance of MacOS X is actively "managed" by the corporation. You know everyone who is developing. Are you really democratizing technology? Hard to say. Please. I implore you. Stop the madness, and facilitate access to running sample code so that we can actually "bridge the digital divide". "Some of us" ACTUALLY need to be able to learn what "some of us" were misled to believe we could. Given that no one is posting about darwinup, I guess I am one of those who someone decided, "does not need to have access." I cannot run the script in SimpleAudioDriver to begin to understand engineering audio drivers for MacOS X. Darwinup at the command line is not available in Big Sur. I am using the very latest Xcode and Command Line Tools for Xcode. How may I successfully install SimpleAudioDriver and otherwise start experimenting with running code that I can then modify to understand? Yes, YES, YES! I addressed the entitlement and signing issue. Yes, I have successfully signed to run locally and did successfully build. I may be quite ignorant, but I am not a complete noob. This is environment: Big Sur 11.4, Xcode 12.5.1, Command Line Tools for Xcode 12.5.1
Asked
by lleathers.
Last updated
.
Post not yet marked as solved
336 Views

Will the AppleUSBAudio kext be reimplemented as an AudioDriverKit?

Currently AppleUSBAudio is implemented as a kernel extension and uses the IOAudioFamily KPI. Given the new AudioDriverKit Driver Extension framework, having AppleUSBAudio as a subclassable AudioDriverKit would save a lot of effort for USB driver development. If AudioDriverKit is not sufficient to fully implement AppleUSBAudio then I'm assuming Apple still sees the need to continue use of IOAudioFamily and that it will continue to be available for use in kernel extensions.
Asked
by scrod.
Last updated
.
Post not yet marked as solved
294 Views

Does AudioDriverKit imply the deprecation of the IOAudioFamily KPI?

Apple's stated policy is that KPIs will be deprecated and removed as System-Extension-based alternatives become available. Given that the IOUserAudio* classes appear to replace IOAudioDevice, IOAudioStream, etc., should I assume that any kext with a com.apple.iokit.IOAudioFamily dependency may soon be prevented from loading?
Asked
by scrod.
Last updated
.