Re: stop/pause mp3

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



From: "ramya"

playback, at anytime ... however, when Run() is called it
blocks until the audio is finished playing...
hr = pControl->Run( );
hr = pEvent->WaitForCompletion( -1, &EventCode );

Run() doesn't block, WaitForCompletion() does. Just don't
call WaitForCompletion() and the graph will run
asynchronously. You can either poll the graph state or sink
graph events to discover when playback is complete. Just
remember to dispatch window messages on the thread that
calls Run().


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


.



Relevant Pages

  • Re: using VMR windowless in MFC Dialog
    ... I do not use GetState or WaitForCompletion after Run ... > i still dont understand why the graph is not fully running? ... "The graph is preparing to run, but some filters have not completed the ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Stopping the graph
    ... What does your graph look like? ... My graph doesnt use any Video enderer, instead i use the DUMP filter to ... and mpg sources, which uses the Elecard demultiplexer, Microsoft MPEG ... GetEventand WaitForCompletion(). ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Stream Buffer Source and WM ASF Writer
    ... connect audio decoder pin to writer. ... Yes, but If I use rot do see graph into GE, pin isn't connected. ... I simpy configure using a built in video/audio profile ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: why USB headsets cant play in 2-input 2-output filter
    ... there is an error "graph can't play" occurred. ... logitech USB headset as the audio capturing source and logitech webcam ... one is audio and the other is video. ... my filter has no problem to play audio and video. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Stream Buffer Source and WM ASF Writer
    ... connect audio decoder pin to writer. ... Yes, but If I use rot do see graph into GE, pin isn't connected. ... I simpy configure using a built in video/audio profile ... A> If you can successfully write the WMV file, try to add a network sink ...
    (microsoft.public.win32.programmer.directx.video)