Massif

PInvoke to handle events

1 post in this topic

I managed to get midi playback working on WM6 using SndPlayAsync. Now I would like to be able to loop the midi. The only way I can see to do this is to detect when the file stops playing and play it again. I believe I might be able to detect the event using SndGetWaitHandle, but I don't know what to do with the event handle once it's retrieved.

[DllImport("aygshell.dll")]

static extern uint SndGetWaitHandle(IntPtr hSound, ref IntPtr phDoneEvent);

Can anyone tell me how to set up an event handler for this kind of event handle? Or if there is an easier way to loop the midi, that would be preferable.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.