How to use DirectX.AudioVideoPlayback????  
Author Message
johnny_no1_boy





PostPosted: DirectShow Development, How to use DirectX.AudioVideoPlayback???? Top

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



Software Development for Windows Vista12  
 
 
johnny_no1_boy





PostPosted: DirectShow Development, How to use DirectX.AudioVideoPlayback???? Top

nobody :(
 
 
Douglas Jordan





PostPosted: DirectShow Development, How to use DirectX.AudioVideoPlayback???? Top

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.

 
 
LGS





PostPosted: DirectShow Development, How to use DirectX.AudioVideoPlayback???? Top

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.


 
 
johnny_no1_boy





PostPosted: DirectShow Development, How to use DirectX.AudioVideoPlayback???? Top

in C# code please...

 
 
LGS





PostPosted: DirectShow Development, How to use DirectX.AudioVideoPlayback???? Top

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