Exemple #1
0
 /// <summary>Callback function for handling recording process information.</summary>
 /// <param name="hdrvr">Audio input device handler.</param>
 /// <param name="uMsg">WIM_CLOSE, WIM_DONE, WIM_OPEN</param>
 /// <param name="dwUser">Additional data for clients use.</param>
 /// <param name="wavhdr">Wave Header.</param>
 /// <param name="dwParam2">Additional parameter.</param>
 internal static void WaveInProc(IntPtr hdrvr, int uMsg, int dwUser, ref WaveHDR wavhdr, int dwParam2)
 {
     if (uMsg == MM_WIM_DATA)
     {
         try
         {
             GCHandle     h   = (GCHandle)wavhdr.dwUser;
             WaveInBuffer buf = (WaveInBuffer)h.Target;
             buf._OnCompleted();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
 private static extern MMSYSERR waveInUnprepareHeader(IntPtr hWaveIn, ref WaveHDR lpWaveInHdr, int uSize);
 private static extern MMSYSERR waveInAddBuffer(IntPtr hwi, ref WaveHDR pwh, int cbwh);
 /// <summary>Callback function for handling recording process information.</summary>
 /// <param name="hdrvr">Audio input device handler.</param>
 /// <param name="uMsg">WIM_CLOSE, WIM_DONE, WIM_OPEN</param>
 /// <param name="dwUser">Additional data for clients use.</param>
 /// <param name="wavhdr">Wave Header.</param>
 /// <param name="dwParam2">Additional parameter.</param>
 internal static void WaveInProc(IntPtr hdrvr, int uMsg, int dwUser, ref WaveHDR wavhdr, int dwParam2)
 {
     if (uMsg == MM_WIM_DATA)
     {
         try
         {
             GCHandle h = (GCHandle)wavhdr.dwUser;
             WaveInBuffer buf = (WaveInBuffer)h.Target;
             buf._OnCompleted();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Exemple #5
0
 private static extern MMSYSERR waveInAddBuffer(IntPtr hwi, ref WaveHDR pwh, int cbwh);
Exemple #6
0
 private static extern MMSYSERR waveInUnprepareHeader(IntPtr hWaveIn, ref WaveHDR lpWaveInHdr, int uSize);