How to use DirectX.AudioVideoPlayback????

Hello.I have used DirectX.AudioPlayback in my application to play MP3 Files But I have a problem.How I know when the playback is finished, because I need to start the next melody.
I have tried to use audio.ending() event, but I don't see any result.

the code is the following:
.... // backmusic is the name for audio
InitializeComponent();
this.backmusic.Ending += new EventHandler(backmusic_Ending);
....
private void backmusic_Ending(object sender, EventHandler e)
{
MessageBox.Show("The playback is completed1!!!");
}


thanks



Answer this question

How to use DirectX.AudioVideoPlayback????

  • sluggy

    nobody :(
  • Zero_

    In the IMediaEventEx Interface you can use SetNotifyWindow to direct event messages to your application. When the message is sent you can use IMediaEvent::GetEvent to retrieve the event that has occured. EC_COMPLETE would occur when the file playback is complete.

  • TheViewMaster

    in C# code please...

  • imed-deborah

    The only .net AV work I have done has been with DirectShow using http://DirectShowNet.SourceForge.net.

    I tried looking up some documentation in DirectX.AudioVideoPlayback, but wasn't able to find anything.

    Not much of an answer, I'm afraid.


  • BrianMcCashin

    Check out the DxPlay sample at http://DirectShowNet.SourceForge.Net. It is c# and uses the IMediaEvent event method he describes.


  • How to use DirectX.AudioVideoPlayback????