none
Audio buffer pointer in kernel driver RRS feed

  • Question

  • I m writing a kernel driver and I have some audio data that i want to play through speaker. How to get a pointer to audio buffer? So that i can use this buffer for writing audio data
    Thursday, April 2, 2015 11:01 PM

Answers

  • Accessing the audio stack from within a driver is possible, but it is very, very difficult (principally because the audio driver documentation is horrible). All the samples in the WDK are for interfacing hardware to the audio stack, not making use of the stack from a driver. I have interfaced to the audio stack for a few clients - but never in the way that you want - and it was always felt like I was sticking needles into my eyes. Unless you need this capability for a product, then the effort needed to implement this will likely exceed your patience.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Friday, April 3, 2015 4:04 AM
    Moderator

All replies

  • Accessing the audio stack from within a driver is possible, but it is very, very difficult (principally because the audio driver documentation is horrible). All the samples in the WDK are for interfacing hardware to the audio stack, not making use of the stack from a driver. I have interfaced to the audio stack for a few clients - but never in the way that you want - and it was always felt like I was sticking needles into my eyes. Unless you need this capability for a product, then the effort needed to implement this will likely exceed your patience.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Friday, April 3, 2015 4:04 AM
    Moderator
  • As a workaround, you could create a "helper" process that runs as a service. This issues I/O requests through a private interface to your driver. When you want to play some audio, your driver completes one of these I/O requests, passing the audio data back to the helper process. The helper process then uses the standard Windows API to play the audio. 
    Thursday, April 16, 2015 12:23 AM