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

  • From: Rajendra Sethi <rajendra.sethi11@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 27 Mar 2019 17:08:14 +0530

Thank you for your response Tim.

On Tue, Mar 26, 2019 at 10:34 PM Tim Roberts <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
Providenza & Boekelheide, Inc.




-- 
*Thanks And Regards*
* Rajendra Sethi*

Other related posts: