[wdmaudiodev] Re: [EXTERNAL] IMiniportWaveRTStreamNotification implemented, but not called

  • From: wdmaudiodev@xxxxxxxxxxxxxx
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2020 09:01:04 -0700

Thank you Matthew, that was the problem.¬† :-)


On 10/26/20 11:37 AM, Matthew van Eerde (Redacted sender Matthew.van.Eerde for DMARC) wrote:


Did you set the PKEY_AudioEndpoint_Supports_EventDriven_Mode property on the KSCATEGORY_AUDIO interface?

https://docs.microsoft.com/en-us/windows/win32/coreaudio/pkey-audioendpoint-supports-eventdriven-mode

If you use the event-driven exclusive mode playback sample app, does portcls use the WithNotification interface?

https://matthewvaneerde.wordpress.com/2009/04/03/sample-wasapi-exclusive-mode-event-driven-playback-app-including-the-hd-audio-alignment-dance/

*From: *wdmaudiodev@xxxxxxxxxxxxxx <mailto:wdmaudiodev@xxxxxxxxxxxxxx>
*Sent: *Monday, October 26, 2020 11:34 AM
*To: *wdmaudiodev@xxxxxxxxxxxxx <mailto:wdmaudiodev@xxxxxxxxxxxxx>
*Subject: *[EXTERNAL] [wdmaudiodev] IMiniportWaveRTStreamNotification implemented, but not called

Hi,

In my MiniportWaveRtStream class, I've implemented IMiniportWaveRTStreamNotification, IMiniportWaveRTInputStream and IMiniportWaveRTOutputStream (in addition to IMiniportWaveRTStream).

The relevant docs say:

    To access the |IMiniportWaveRTStreamNotification| interface, the
    WaveRT port driver
    
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Faudio%2Fwavert-port-driver&data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5603cd28f7fe45bf275508d879ddc027%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637393340634432152%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6WZUGgxEFk2QXWk0Av5mSCzl1JrTBZ%2BzlZN5puxKe8I%3D&reserved=0>
    calls the IMiniportWaveRT::NewStream
    
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fddi%2Fportcls%2Fnf-portcls-iminiportwavert-newstream&data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5603cd28f7fe45bf275508d879ddc027%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637393340634442127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qCEY%2FxVCwxPAZa0ih8kVYwrTrkYlfC7oFix0IA99qRo%3D&reserved=0>
    method and receives an IMiniportWaveRTStream
    
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fddi%2Fportcls%2Fnn-portcls-iminiportwavertstream&data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5603cd28f7fe45bf275508d879ddc027%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637393340634442127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XCAIpf3EolNulKI0iJ%2FYaMR2vBAo2V45AyHkhu9A%2F1I%3D&reserved=0>
    interface. The WaveRT port driver then queries the
    *IMiniportWaveRTStream* interface, uisng QueryInterface, and
    receives the |IMiniportWaveRTStreamNotification| interface.

...and I've verified that's happening; I see calls from PortCls to my stream class's NonDelegatingQueryInterface for all three interfaces. Unfortunately, none of the methods on any of those three interfaces ever gets called. For example, when I play audio through my driver, I still see IMiniportWaveRtStream::AllocateAudioBuffer being called instead of IMiniportWaveRtStreamNotification::AllocateBufferWithNotification.

Anyone know what I might be doing wrong?

Other related posts: