[wdmaudiodev] Re: Can I use IAudioProcessingObject::Reset to retrigger format negotiation without stopping previously-ongoing audio processing?

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 15 Oct 2018 15:36:31 +0000

Whatever UI the user is using to make the property change also needs to call 
IAudioEndpointFormatControl::ResetToDefault
https://docs.microsoft.com/en-us/windows/desktop/api/audioendpoints/nf-audioendpoints-iaudioendpointformatcontrol-resettodefault

This will tear down all the active streams and cause a renegotiation of the 
audio formats

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Culann mac Cabe <culann@xxxxxxxxxx>
Sent: Monday, October 15, 2018 6:31:51 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Can I use IAudioProcessingObject::Reset to retrigger 
format negotiation without stopping previously-ongoing audio processing?

Hello wdmaudiodev people

I am writing an APO whose input format compatibilities may change 
mid-audio-process, (when the user changes a certain property, which can happen 
at any time).

So essentially when the User makes this property change, I'd like to restart 
the whole format negotiation process, preferably without stopping audio 
playback (I can accept the inevitable audio "click/pop" that will result).

Is 
IAudioProcessingObject::Reset<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmsdn.microsoft.com%2F9d8c13cb-012e-4b5e-a1fd-1c2e5b9200b8&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C9eec7e0f2f0a4453257808d632a2bb59%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752071962681722&sdata=Qk%2Fe9Dx3%2BOwDaVTCVTO4loU7rNm%2Fv7CkcCRvoAfZeww%3D&reserved=0>
 my friend here?  As far as I can tell, this will do what I need, although it's 
not clear if Windows will restart audio playback (if it was ongoing) after the 
Reset call and all the other calls that it precipitates.

(Btw I'm using "old-style" APO, as I need Win7 compatility).

Thanks!
Culann mac Cabe

Other related posts: