[wdmaudiodev] sample rate control on Vista

  • From: "Nikolay V. Pyatkov" <npyatkov@xxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Sun, 16 Jul 2006 18:21:37 -0400

Hi,

We have an input only WDM portcls audio driver on Vista 5456. The driver can 
support 48,000 and 44,100 sample rate. The application needs to open this 
driver at 48,000. Here is the code:

WAVEFORMATEX wf;
wf.wFormatTag   Â= WAVE_FORMAT_PCM;
wf.nChannels    =  2;
wf.nSamplesPerSec Â= 48000;
wf.nAvgBytesPerSec = 192000;
wf.nBlockAlign   = nBlockAlign;
wf.wBitsPerSample Â= UCODEC_BIT_PER_SAMPLE_PCM;
wf.cbSize     Â= 0;

mmResult = waveInOpen(
        &m_hWaveIn, 
        nInputDeviceId,
        &m_WaveFormat,
        (DWORD_PTR)m_hWaveInEvent,
        0,
         CALLBACK_EVENT);

mmResult is 0.

But the trace in the driver shows:

00000431        9.63108540      ValidatePcm :   
00000432        9.63109016      ---- cbSize         = 22        
00000433        9.63109398      ---- nChannels      = 2 
00000434        9.63109875      ---- nSamplesPerSec = 44100     
00000435        9.63110352      ---- wBitsPerSample = 16        

The Vista audio subsystem took the parameters from "Audio 
Devices->Recording->My Device->Properties->Options" .If I manually modify 
value in the Options panel Vista will use the value to open my device.

I tried to check/uncheck "exclusive control" box. Does not help. How do I get 
control over the bit rate back to the application? 

Thanks,
Nikolay








******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: