Restauration de la détection des perifs physiques
This commit is contained in:
parent
4bae84ee23
commit
4075ca7f34
3 changed files with 450 additions and 348 deletions
|
|
@ -70,11 +70,11 @@ namespace DMX2
|
|||
return Invoke.snd_seq_connect_to (seq_handle.Handle, portid, p.ClientId, p.PortId) == 0;
|
||||
}
|
||||
|
||||
internal bool ConnectTo(int client, int port){
|
||||
/*internal bool ConnectTo(int client, int port){
|
||||
if (seq_handle == null)
|
||||
throw new InvalidOperationException ();
|
||||
return Invoke.snd_seq_connect_to (seq_handle.Handle, portid, client, port) == 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
public bool ConnectFrom(Port p){
|
||||
if (seq_handle == null)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace DMX2
|
|||
//static int outport;
|
||||
|
||||
static System.Threading.Thread eventthread = null;
|
||||
static MidiPort systemPort = null;
|
||||
//static MidiPort systemPort = null;
|
||||
|
||||
static internal Dictionary<int, MidiPort> openports = new Dictionary<int, MidiPort>();
|
||||
|
||||
|
|
@ -129,6 +129,7 @@ namespace DMX2
|
|||
clientId = _clientId;
|
||||
portId = _portId;
|
||||
srcid = clientId << 8 + portId;
|
||||
ports.Add(srcid, this);
|
||||
}
|
||||
|
||||
private void Updateinfo (PointerWrapper portInfo)
|
||||
|
|
@ -177,8 +178,8 @@ namespace DMX2
|
|||
System.Threading.ThreadStart ts = new System.Threading.ThreadStart (EventLoop);
|
||||
eventthread = new System.Threading.Thread (ts);
|
||||
eventthread.Start();
|
||||
systemPort = new MidiPort ("system");
|
||||
systemPort.ConnectTo (SND_SEQ_CLIENT_SYSTEM, SND_SEQ_PORT_SYSTEM_ANNOUNCE);
|
||||
//systemPort = new MidiPort ("system");
|
||||
//systemPort.ConnectTo (SND_SEQ_CLIENT_SYSTEM, SND_SEQ_PORT_SYSTEM_ANNOUNCE);
|
||||
}
|
||||
|
||||
public static void Close ()
|
||||
|
|
@ -201,16 +202,16 @@ namespace DMX2
|
|||
// liberation du pointeur
|
||||
Invoke.snd_seq_free_event (evPtr);
|
||||
|
||||
if (ev.dest.port == systemPort.portid) {
|
||||
/*if (ev.dest.port == systemPort.portid) {
|
||||
if (ev.type == AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_START) {
|
||||
|
||||
}
|
||||
} else {
|
||||
} else {*/
|
||||
// queue
|
||||
if (openports.ContainsKey (ev.dest.port)) {
|
||||
openports [ev.dest.port].eventqueue.Enqueue (ev);
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
System.Threading.Thread.Sleep (1);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue