Beispiel #1
0
 public static long GetPositionBytes(IntPtr hWaveOut, object lockObject)
 {
     lock (lockObject)
     {
         MmTime mmTime = new MmTime();
         mmTime.wType = 4U;
         MmException.Try(AudioInterop.waveOutGetPosition(hWaveOut, ref mmTime, Marshal.SizeOf((object)mmTime)), "waveOutGetPosition");
         if (mmTime.wType != 4U)
         {
             throw new Exception($"waveOutGetPosition: wType -> Expected {4}, Received {mmTime.wType}");
         }
         return(mmTime.cb);
     }
 }