Beispiel #1
0
 public static void Start(Stream stream, int device)
 {
     BassNative.RecordSetDevice(device);
     _channel     = BassNative.RecordStart(0, 1, 0, RecordCallback, IntPtr.Zero);
     _inputStream = stream;
     _recording   = true;
 }
Beispiel #2
0
        public bool MoveNext()
        {
            DeviceInfo device = default;

            while (!device.flags.HasFlagFast(Device.Enabled) & BassNative.GetDevice(Index, out device))
            {
                Index++;
            }

            Current = new AudioDevice(Index, device);

            return(device.flags.HasFlagFast(Device.Enabled));
        }
Beispiel #3
0
        public bool MoveNext()
        {
            DeviceInfo device = default;

            while ((!device.flags.HasFlagFast(Device.Enabled) || !device.flags.HasFlagFast(Device.TypeMicrophone)) &
                   BassNative.GetRecordDevice(Index, out device))
            {
                Index++;
            }

            Current = new AudioDevice(Index, device);

            return(device.flags.HasFlagFast(Device.Enabled) && device.flags.HasFlagFast(Device.TypeMicrophone));
        }
Beispiel #4
0
 public static void Unpause()
 {
     BassNative.ChannelPlay(_channel, false);
 }
Beispiel #5
0
 public static void Pause()
 {
     BassNative.ChannelPause(_channel);
 }
Beispiel #6
0
 public static void Stop()
 {
     BassNative.ChannelStop(_channel);
     _inputStream = null;
     _recording   = false;
 }
Beispiel #7
0
 private static void OnProcessExit(object sender, EventArgs e)
 {
     BassNative.RecordFree();
 }
Beispiel #8
0
 static InputManager()
 {
     RecordCallback = RecordProcess;
     BassNative.RecordInit(-1);
     AppDomain.CurrentDomain.ProcessExit += OnProcessExit;
 }