-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProgram.cs
30 lines (24 loc) · 877 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Linq;
using System.Reactive.Concurrency;
using SmartHomeDotNet.Computer.Audio;
using SmartHomeDotNet.SmartHome.Commands;
using SmartHomeDotNet.SmartHome.Devices_2;
namespace SmartHomeDotNet.Computer.LocalTests
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Welcome to the dev console!");
var devices = AudioDeviceHost.GetDeviceIds();
var host = new AudioDeviceHost();
var registry = new DeviceRegistry(Scheduler.Immediate);
registry.RegisterHost(host);
var dev = registry.Bind<Microphone>(new AudioDeviceIdentifier(devices.First()));
//var dev = registry.Bind<Microphone>(new AudioDeviceIdentifier("Microphone (2- Logitech G933 Gaming Headset)"));
//var dev = registry.Bind<Microphone>(new AudioDeviceIdentifier("Casque (PXC 550 Stereo)"));
dev.TurnOff().ToTask().Wait();
}
}
}