public static void Start(Stream stream, int device) { BassNative.RecordSetDevice(device); _channel = BassNative.RecordStart(0, 1, 0, RecordCallback, IntPtr.Zero); _inputStream = stream; _recording = true; }
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)); }
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)); }
public static void Unpause() { BassNative.ChannelPlay(_channel, false); }
public static void Pause() { BassNative.ChannelPause(_channel); }
public static void Stop() { BassNative.ChannelStop(_channel); _inputStream = null; _recording = false; }
private static void OnProcessExit(object sender, EventArgs e) { BassNative.RecordFree(); }
static InputManager() { RecordCallback = RecordProcess; BassNative.RecordInit(-1); AppDomain.CurrentDomain.ProcessExit += OnProcessExit; }