samedi 9 août 2014

OSX - pilote virtuel de développement Mac OS X - Stack Overflow


I am looking forward to develop a driver (probably virtual) allowing to read audio streams within the computer (to modify MIDI streams actually), to send them to a software, after being analyzed by another part of the program.


The point is that, as much as I looked over Mac OS X documentation about drivers, I don't seem to find much practical information. I know that the Windows documentation is far better and much more explicit, but can I rely on that ?


So, do you have any information about virtual driver development on Mac OS X ?


Thanks in advance.




Windows drivers are likely to be very different from OSX.


OSX provides IOKit for drivers and has an IOAudioFamily interface, but I don't think it will be for MIDI. You may, however, be able to use the USB interface (IOUSBFamily) and go from there, assuming you're receiving the signals via a midi-USB cable.


The Apple docs aren't bad, but finding what's relevant is not so easy!


Developing a USB driver will involve creating a Kernel Extension (Kext) in C++ and subclassing the appropriate interface, minimising the amount of code you'll have to write.


Once you've read that, this tutorial for creating a device driver may be useful.


If you still don't like the Apple docs, I recommend getting the book "OSX and iOS Kernel Programming" by Halvorson & Clarke which, despite its title, is mostly concerned with developing drivers.



I am looking forward to develop a driver (probably virtual) allowing to read audio streams within the computer (to modify MIDI streams actually), to send them to a software, after being analyzed by another part of the program.


The point is that, as much as I looked over Mac OS X documentation about drivers, I don't seem to find much practical information. I know that the Windows documentation is far better and much more explicit, but can I rely on that ?


So, do you have any information about virtual driver development on Mac OS X ?


Thanks in advance.



Windows drivers are likely to be very different from OSX.


OSX provides IOKit for drivers and has an IOAudioFamily interface, but I don't think it will be for MIDI. You may, however, be able to use the USB interface (IOUSBFamily) and go from there, assuming you're receiving the signals via a midi-USB cable.


The Apple docs aren't bad, but finding what's relevant is not so easy!


Developing a USB driver will involve creating a Kernel Extension (Kext) in C++ and subclassing the appropriate interface, minimising the amount of code you'll have to write.


Once you've read that, this tutorial for creating a device driver may be useful.


If you still don't like the Apple docs, I recommend getting the book "OSX and iOS Kernel Programming" by Halvorson & Clarke which, despite its title, is mostly concerned with developing drivers.


0 commentaires:

Enregistrer un commentaire