[wdmaudiodev] set the default audio format dynamically during/after driver installation

  • From: "Johannes Freyberger" <jfreyberger@xxxxxxxxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 13 Aug 2018 10:49:19 +0200

Hi all,

 

I've written a virtual audio driver and during the installation I'm setting
the default format by defining the registry entry PKEY_AudioEngine_OEMFormat
in my inf file to 48kHz, 24 Bits. Some of our customers switch this to
44.1kHz, 24 Bits which is also supported by the driver and it works correct.
Now when I provide a new version of the driver the format is set back to
48kHz, 24 Bits according to the inf file. But from a registry entry I've
written before, I'd know that the previous format was 44.1kHz. Is there a
way to switch back to 44.1 kHz automatically after the driver update so the
customer doesn't have to go to the drivers properties and do this manually?
I thought about doing this by finding the corresponding registry i.e. in
SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render and set the
values as I can watch it when I do this manually. But this doesn't seem to
work. Modifying the inf file probably also is no option as this has to be
signed and thus cannot be modified at runtime.

 

Thanks and best regards,

Johannes

 

 

Other related posts: