Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Support from the virtual audio driver for multiple sampling frequencies

ChandraTutikaChandraTutika Member Posts: 13

Hi All,
I have created a virtual audio driver and the corresponding application that works as a bypass device. The application receives audio frames from a physical microphone and passes the frames over to the virtual audio driver. The virtual audio driver puts the audio frames as the output of the microphone to an application like Audacity.

The virtual audio driver currently has support for only 48KHz.

https://drive.google.com/file/d/1CD8CEc9k2Lg8jVJBF_pCa2VFrgCAT99c/view?usp=drive_link

How can I make it support multiple frequencies, like 16k, 32k, etc?

https://drive.google.com/file/d/1RyBGmAu_nk-JyLdUJr5VmzJRIbsHiaaH/view?usp=drive_link

I tried adding it to this data structure. But only the first element of this array works.

static
KSDATAFORMAT_WAVEFORMATEXTENSIBLE MicArrayPinSupportedDeviceFormats[] =
{
// 48 KHz 32-bit 2 channels
{
{
sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
0,
0,
0,
STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
},
{
{
WAVE_FORMAT_EXTENSIBLE,
2,
48000,
384000,
8,
32,
sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
},
32,
KSAUDIO_SPEAKER_STEREO,
STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
}
},
// 16 KHz 32-bit 2 channels
{
{
sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
0,
0,
0,
STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
},
{
{
WAVE_FORMAT_EXTENSIBLE,
2,
16000,
128000,
8,
32,
sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
},
32,
KSAUDIO_SPEAKER_STEREO,
STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
}
},

};

Thanks in advance.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online