Robert Bielik skrev 2010-11-11 08:07:
Matthew van Eerde skrev 2010-11-10 21:35:In Windows 7, you do this by raising a KSEVENT_PINCAPS_FORMATCHANGE in your driver. A more dramatic way to do this, which works in all versions of Windows, is to unregister and reregisterg the driver interface (which effectively tears down the audio device and builds it up again.)You mean via PortCls IUnregisterSubdevice / PcRegisterSubdevice ?
Oki, been looking at IUnregisterSubdevice, and it seems like (kind of) a good way to do this. It might even solve the problem how to change the samplerate towards my target sound device during streaming (which I today inhibit)? Anyway, I find no reference impl in the 7600.16385.0 WinDDK, nor anything tangible on the net. Some earlier posts on this list suggest also that the name of the wave device need to change (i.e. the old default format will be used if the name of the newly registered subdevice is the same, thereby rendering the whole exercise pointless) But I'm not sure how to control this dynamic (un)registering, is it OK to create an additinal device object in AddDevice (i.e. do an extra IoCreateDevice to provide a device object to control the audio device (via IOCTLs)? /Rob ****************** 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/