daemon: Fix direction of room link ports in studio graph
This commit is contained in:
parent
7c81ae351d
commit
29282299ad
|
@ -814,6 +814,23 @@ add_room_ports(
|
||||||
uint32_t port_flags)
|
uint32_t port_flags)
|
||||||
{
|
{
|
||||||
//log_info("Studio room port \"%s\"", port_name);
|
//log_info("Studio room port \"%s\"", port_name);
|
||||||
|
|
||||||
|
if (JACKDBUS_PORT_IS_INPUT(port_flags))
|
||||||
|
{
|
||||||
|
JACKDBUS_PORT_CLEAR_INPUT(port_flags);
|
||||||
|
JACKDBUS_PORT_SET_OUTPUT(port_flags);
|
||||||
|
}
|
||||||
|
else if (JACKDBUS_PORT_IS_OUTPUT(port_flags))
|
||||||
|
{
|
||||||
|
JACKDBUS_PORT_CLEAR_OUTPUT(port_flags);
|
||||||
|
JACKDBUS_PORT_SET_INPUT(port_flags);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log_error("room link port with bad flags %"PRIu32, port_flags);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return ladish_graph_add_port(g_studio.studio_graph, context, port_handle, port_name, port_type, port_flags, false);
|
return ladish_graph_add_port(g_studio.studio_graph, context, port_handle, port_name, port_type, port_flags, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* LADI Session Handler (ladish)
|
* LADI Session Handler (ladish)
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Nedko Arnaudov <nedko@arnaudov.name>
|
* Copyright (C) 2009, 2010 Nedko Arnaudov <nedko@arnaudov.name>
|
||||||
*
|
*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
* This file contains constants for D-Bus service and interface names and for D-Bus object paths
|
* This file contains constants for D-Bus service and interface names and for D-Bus object paths
|
||||||
|
@ -63,4 +63,13 @@
|
||||||
#define URI_CANVAS_X "http://ladish.org/ns/canvas/x"
|
#define URI_CANVAS_X "http://ladish.org/ns/canvas/x"
|
||||||
#define URI_CANVAS_Y "http://ladish.org/ns/canvas/y"
|
#define URI_CANVAS_Y "http://ladish.org/ns/canvas/y"
|
||||||
|
|
||||||
|
#define JACKDBUS_PORT_IS_INPUT(flags) (((flags) & JACKDBUS_PORT_FLAG_INPUT) != 0)
|
||||||
|
#define JACKDBUS_PORT_IS_OUTPUT(flags) (((flags) & JACKDBUS_PORT_FLAG_OUTPUT) != 0)
|
||||||
|
|
||||||
|
#define JACKDBUS_PORT_SET_INPUT(flags) (flags) |= JACKDBUS_PORT_FLAG_INPUT
|
||||||
|
#define JACKDBUS_PORT_SET_OUTPUT(flags) (flags) |= JACKDBUS_PORT_FLAG_OUTPUT
|
||||||
|
|
||||||
|
#define JACKDBUS_PORT_CLEAR_INPUT(flags) (flags) &= ~JACKDBUS_PORT_FLAG_INPUT
|
||||||
|
#define JACKDBUS_PORT_CLEAR_OUTPUT(flags) (flags) &= ~JACKDBUS_PORT_FLAG_OUTPUT
|
||||||
|
|
||||||
#endif /* #ifndef DBUS_CONSTANTS_H__C21DE0EE_C19C_42F0_8D63_D613E4806C0E__INCLUDED */
|
#endif /* #ifndef DBUS_CONSTANTS_H__C21DE0EE_C19C_42F0_8D63_D613E4806C0E__INCLUDED */
|
||||||
|
|
Loading…
Reference in New Issue