Exemple #1
0
 internal static void WaveInProc(IntPtr hdrvr, int uMsg, int dwUser, ref WaveNative.WaveHdr wavhdr, int dwParam2)
 {
     if (uMsg == WaveNative.MmWimData)
     {
         try
         {
             GCHandle     h   = (GCHandle)wavhdr.dwUser;
             WaveInBuffer buf = (WaveInBuffer)h.Target;
             buf.OnCompleted();
         }
         catch
         {
             // ignored
         }
     }
 }
Exemple #2
0
        internal static void WaveOutProc(IntPtr hdrvr, int uMsg, int dwUser, ref WaveNative.WaveHdr wavhdr,
                                         int dwParam2)
        {
            if (uMsg != WaveNative.MmWomDone)
            {
                return;
            }

            try
            {
                var h   = (GCHandle)wavhdr.dwUser;
                var buf = (WaveOutBuffer)h.Target;
                buf.OnCompleted();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }