Changeset 3a5b7037d88ca19b2003cba39fa7a4ed2bbfae0c

Show
Ignore:
Timestamp:
12/27/10 06:29:24 (2 years ago)
Author:
Nedko Arnaudov <nedko@…>
Children:
da4a6eb2a1588a437c77eee59f27a181876f0eeb
Parents:
4f7b78388fa1a85e4868c979c0b8bdbeac685417
git-committer:
Nedko Arnaudov <nedko@arnaudov.name> / 2010-12-27T06:29:24Z+0200
Message:

ladish_control: when dumping vgraphs, show port type and direction

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ladish_control

    r4f7b783 r3a5b703  
    148148        print '"%s"' % client[1] 
    149149        for port in client[2]: 
    150             print '  "%s"' % port[1] 
     150            port_flags = port[2] 
     151            if (port_flags & 1) != 0: 
     152                port_flags = "input" 
     153            elif (port_flags & 2) != 0: 
     154                port_flags = "output" 
     155            else: 
     156                port_flags = "unknown" 
     157 
     158            port_type = port[3] 
     159            if port_type == 0: 
     160                port_type = "audio" 
     161            elif port_type == 1: 
     162                port_type = "midi" 
     163            else: 
     164                port_type = "unknown" 
     165 
     166            print '  "%s" [%s %s]' % (port[1], port_flags, port_type) 
    151167    print 
    152168    if len(graph[2]):