locked
Windows media player loop problem RRS feed

  • Question

  • Hiii,
    Im developing sound application.In that i have used windows media player class. and im play all the sounds in the loop.
    The problem is that when phone call arrive the sound files are playe in the background.
    so can u pls tel how i can stop the sound when phone call arrive.

    Thanks  
    Monday, January 18, 2010 7:31 AM

Answers

  • Hii.
    Hey im looking for this only.
    i haved  used systemstate property to check new incomeing call
    and my problem get solved.
    Thanks all of you for your help.


    Thanks onces agin. 

    • Marked as answer by Niks 86 Wednesday, January 20, 2010 9:46 AM
    Wednesday, January 20, 2010 9:46 AM

All replies

  • Hii all
    Im developing sound application.in that i have userd windows media player class. and im play all sound in loop.
    The problem is when phone call arrive the sound play in the background.
    can u tel mw how i can stop that loop till call end.
    plsss help me.  
    • Merged by Jing0 Wednesday, January 20, 2010 5:17 AM dup
    Monday, January 18, 2010 7:21 AM
  • You could use AxWindowsMediaPlayer1.Ctlcontrols.pause() to Pause playback and  AxWindowsMediaPlayer1.Ctlcontrols.play() to resume it.


    Thanks

    Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
    My BlogMy Facebook
    Monday, January 18, 2010 1:40 PM
  • Hii
    Hey  thanks for your replay bt i din not work for me.
    i want to stop the music when phone call ringing.
    now when phone ring the music get played at backgound.
    can just tel me how i can change the state of it  when phone call come.


    Thanks
    Tuesday, January 19, 2010 5:59 AM
  • What do you mean by it doesnt work for you ? AxWindowsMediaPlayer1.Ctlcontrols.pause() doesnt Pause playback ? How did you try it ? Add a button to try it out and in Click event of button, enter that code.

    and what phone ring ? is that some sort of VOIP client ? or using TAPI ? did you place that Pause playback code line where you get incoming call alert ?



    Thanks

    Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
    My BlogMy Facebook
    Wednesday, January 20, 2010 7:23 AM
  • >>so can u pls tel how i can stop the sound when phone call arrive.

    Based on my understandings, you need to pause the media player when there is an incoming call, don't you? And the main problem you are facing is how to detect it when there is an incoming call.

    Well, if I understand correctly, the State and Notification Broker API (SNAPI) is what you've been look for. Specifically you need to monitor the SystemState.PhoneIncomingCall/PhoneCallTalking property:
    http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.status.systemstate.phoneincomingcall.aspx 

    For more information about using the SNAPI, please refer to the following articles:
    The State and Notifications Broker Part I  
    The State and Notifications Broker API Part 2  
    The State and Notifications Broker API Part 3
     
    Please mark the post that helps you, and unmark that does not. This benefits our community.
    Wednesday, January 20, 2010 8:37 AM
  • Hii.
    Hey im looking for this only.
    i haved  used systemstate property to check new incomeing call
    and my problem get solved.
    Thanks all of you for your help.


    Thanks onces agin. 

    • Marked as answer by Niks 86 Wednesday, January 20, 2010 9:46 AM
    Wednesday, January 20, 2010 9:46 AM