[wdmaudiodev] Re: External clock synchronization and sample rate issue

  • From: "Jeff Pages" <jeff@xxxxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 11 Jan 2007 09:55:26 +1100

I had a similar problem, where I wanted the audio engine sampling rate of each endpoint to match the hardware clock on my card which was set globally in a driver property page.


One of the Microsoft people suggested I have several different wave miniports (each with a different name) defined in my inf file and driver, with each supporting only one sampling rate in its pin datarange structure, and only instantiating the one corresponding to the hardware clock. Since my driver was unloaded and reloaded if the hardware clock was changed in my Device Manager property page, this was pretty easy to implement and worked well.

In your case, where the external clock can change while the driver's running, you might be able to use the IUnregisterPhysicalConnection and IUnregisterSubdevice interfaces to remove the current subdevice and then activate and register the one corresponding to the new rate (see the stuff on Dynamic Audio Subdevices in the WDK).

Jeff Pages
Innes Corporation Pty Ltd

----- Original Message ----- From: "Philip Lukidis" <plukidis@xxxxxxxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Thursday, January 11, 2007 9:20 AM
Subject: [wdmaudiodev] External clock synchronization and sample rate issue


Hello. I'm wondering if anyone else has any clue about solving this issue. My audio device can be clocked from an external source. For example, the audio format of the device can be set to 16 bits 44100 in the advanced tab in the MS audio cpl, and thereafter using our own control panel be clocked off an external source which is at the same rate of 44100.

Now say that the external source's clock changes from 44100 to 48000. Under XP, my datarange intersection handler would merely constrain the format's sample rate to match the new external sample rate. Under Vista, the system will never try to send at any other rate other than what is the selected rate in the advanced tab of the audio device.

Does anyone have a suggestion as to how to cope with this? Is there a way to programmatically change the selected format of the device? Or is there another approach?

thank you,

Philip Lukidis
******************

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/



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

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: