[wdmaudiodev] Re: Why LockForProcess is getting called when audio is finished

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 2 Apr 2019 14:47:01 +0000

If you’re seeing an APOProcess call outside of a (LockForProcess, 
UnlockForProcess) interval then that’s a very bad bug in Windows.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Rajendra Sethi <rajendra.sethi11@xxxxxxxxx>
Sent: Tuesday, April 2, 2019 3:56:33 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Why LockForProcess is getting called when audio is 
finished

Hi All,
    It's really annoying me how the LockForProcess and UnLockForProcess are 
getting called. Till now in windows 10 Desktop version the calling process was 
LockForProcess -> APOProcess->UnLockForProcess. But When I debugging same APO 
dll I am getting some different calling process i.e 
LockForProcess->UnLockForProcess->APOProcess. I am really confused what's 
happening.
Can anyone please help me on this.

Regards,
Rajendra

On Wed, Mar 27, 2019 at 5:08 PM Rajendra Sethi 
<rajendra.sethi11@xxxxxxxxx<mailto:rajendra.sethi11@xxxxxxxxx>> wrote:
Thank you for your response Tim.

On Tue, Mar 26, 2019 at 10:34 PM Tim Roberts 
<timr@xxxxxxxxx<mailto:timr@xxxxxxxxx>> wrote:
Rajendra Sethi wrote:


   As I had impression before that LockForProcess and UnLockForProcess
are called once for each start and stop of audio media i.e
before/after APOProcess is called. But while debugging I got that
after audio media stop LockForProcess is getting called once again.

Is there any way to stop this i.e to stop LockForProcess to called
again after audio stopped playing.

I'm fascinated by your posts.  YOU don't get to redefine the API to work
the way you want it to.  Instead, YOU have the responsibility to make
your APO respond to the APIs as they are specified.  LockForProcess and
UnlockForProcess have well-defined meanings.  You have to write your APO
to fit those meanings.  A LockForProcess call usually means the engine
is gearing up to start streaming.  It might decide that it didn't really
want to, in which case it will Unlock.  You have to handle that.

--
Tim Roberts, timr@xxxxxxxxx<mailto:timr@xxxxxxxxx>
Providenza & Boekelheide, Inc.




--
Thanks And Regards
 Rajendra Sethi


--
Thanks And Regards
 Rajendra Sethi

Other related posts: