예제 #1
0
 public AlsaSequencer(AlsaIOType ioType, AlsaIOMode ioMode, string driverName = "default")
 {
     unsafe {
         var ptr  = IntPtr.Zero;
         var pref = &ptr;
         driver_name_handle = Marshal.StringToHGlobalAnsi(driverName);
         var err = Natives.snd_seq_open((IntPtr)pref, driver_name_handle, (int)ioType, (int)ioMode);
         if (err != 0)
         {
             throw new AlsaException(err);
         }
         seq = ptr;
     }
     io_type = ioType;
 }
예제 #2
0
 public static void StartSequencer(AlsaIOType type, AlsaIOMode mode, string drivername = "default")
 {
     sequencer = new AlsaSequencer(type, mode, drivername);
     isRunning = true;
 }