示例#1
0
 public void HaveBackend()
 {
     Assert.IsTrue(SoundIO.HaveBackend(SoundIOBackend.Dummy), "not even a Dummy?");
     if (Environment.OSVersion.Platform != PlatformID.Unix)
     {
         Assert.IsFalse(SoundIO.HaveBackend(SoundIOBackend.Alsa), "Wait, your Windows has ALSA??");
     }
     else
     {
         Assert.IsFalse(SoundIO.HaveBackend(SoundIOBackend.Wasapi), "Wut, you have WASAPI on your Unix platform?");
     }
 }
示例#2
0
        static void ShowUsageToExit()
        {
            Console.Error.WriteLine(@"Arguments:
--watch		watch devices.
--backend:xxx	specify backend to use.

libsoundio version: {0}

available backends: {1}
",
                                    SoundIO.VersionString,
                                    string.Join(", ", Enum.GetValues(typeof(SoundIOBackend))
                                                .Cast <SoundIOBackend> ()
                                                .Where(b => SoundIO.HaveBackend(b))));
        }