@@ -254,7 +254,7 @@ def __iter__(self):
254254 def __repr__ (self ):
255255 return self ._portlist .__repr__ ()
256256
257- def register (self , shortname , is_terminal = False ):
257+ def register (self , shortname , is_terminal = False , is_physical = False ):
258258 """Create a new input/output port.
259259
260260 The new :class:`OwnPort` object is automatically added to
@@ -282,6 +282,9 @@ def register(self, shortname, is_terminal=False):
282282 Audio synthesizers, I/O hardware interface clients, HDR
283283 systems are examples of clients that would set this flag for
284284 their ports.
285+ is_physical : bool
286+ If ``True`` the port corresponds to some kind of physical
287+ I/O connector.
285288
286289 Returns
287290 -------
@@ -290,7 +293,7 @@ def register(self, shortname, is_terminal=False):
290293
291294 """
292295 port = self ._client ._register_port (shortname , is_terminal ,
293- self ._flag )
296+ is_physical , self ._flag )
294297 self ._portlist .append (port )
295298 return port
296299
@@ -1217,10 +1220,12 @@ def callback_decorator(python_callable):
12171220 return function_ptr
12181221 return callback_decorator
12191222
1220- def _register_port (self , shortname , is_terminal , flags ):
1223+ def _register_port (self , shortname , is_terminal , is_physical , flags ):
12211224 """Create a new port."""
12221225 if is_terminal :
12231226 flags |= _lib .JackPortIsTerminal
1227+ if is_physical :
1228+ flags |= _lib .JackPortIsPhysical
12241229 port_ptr = _lib .jack_port_register (self ._ptr , shortname .encode (),
12251230 "32 bit float mono audio" .encode (),
12261231 flags , 0 )
0 commit comments