Jamulus now works with jack mono input and mono output devices
This commit is contained in:
parent
5fdaea0e55
commit
a848f69f16
1 changed files with 18 additions and 26 deletions
|
@ -103,17 +103,7 @@ void CSound::OpenJack()
|
||||||
JackPortIsPhysical | JackPortIsOutput ) ) == NULL )
|
JackPortIsPhysical | JackPortIsOutput ) ) == NULL )
|
||||||
{
|
{
|
||||||
throw CGenErr ( tr ( "There are no physical capture ports available. "
|
throw CGenErr ( tr ( "There are no physical capture ports available. "
|
||||||
"This software requires at least one stereo input channel available. "
|
"This software requires at least one input channel available. "
|
||||||
"Maybe you have selected the wrong sound card in the Jack server "
|
|
||||||
"configuration.<br>"
|
|
||||||
"You can use a tool like <i><a href=""http://qjackctl.sourceforge.net"">QJackCtl</a></i> "
|
|
||||||
"to adjust the Jack server settings." ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !ports[1] )
|
|
||||||
{
|
|
||||||
throw CGenErr ( tr ( "There are no physical capture ports available. "
|
|
||||||
"This software requires at least one stereo input channel available. "
|
|
||||||
"Maybe you have selected the wrong sound card in the Jack server "
|
"Maybe you have selected the wrong sound card in the Jack server "
|
||||||
"configuration.<br>"
|
"configuration.<br>"
|
||||||
"You can use a tool like <i><a href=""http://qjackctl.sourceforge.net"">QJackCtl</a></i> "
|
"You can use a tool like <i><a href=""http://qjackctl.sourceforge.net"">QJackCtl</a></i> "
|
||||||
|
@ -124,10 +114,16 @@ void CSound::OpenJack()
|
||||||
{
|
{
|
||||||
throw CGenErr ( tr ( "Cannot connect the Jack input ports" ) );
|
throw CGenErr ( tr ( "Cannot connect the Jack input ports" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// before connecting the second stereo channel, check if the input is not
|
||||||
|
// mono
|
||||||
|
if ( ports[1] )
|
||||||
|
{
|
||||||
if ( jack_connect ( pJackClient, ports[1], jack_port_name ( input_port_right ) ) )
|
if ( jack_connect ( pJackClient, ports[1], jack_port_name ( input_port_right ) ) )
|
||||||
{
|
{
|
||||||
throw CGenErr ( tr ( "Cannot connect the Jack input ports" ) );
|
throw CGenErr ( tr ( "Cannot connect the Jack input ports" ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
free ( ports );
|
free ( ports );
|
||||||
|
|
||||||
|
@ -135,31 +131,28 @@ void CSound::OpenJack()
|
||||||
JackPortIsPhysical | JackPortIsInput ) ) == NULL )
|
JackPortIsPhysical | JackPortIsInput ) ) == NULL )
|
||||||
{
|
{
|
||||||
throw CGenErr ( tr ( "There are no physical playback ports available. "
|
throw CGenErr ( tr ( "There are no physical playback ports available. "
|
||||||
"This software requires at least one stereo output channel available. "
|
"This software requires at least one output channel available. "
|
||||||
"Maybe you have selected the wrong sound card in the Jack server "
|
"Maybe you have selected the wrong sound card in the Jack server "
|
||||||
"configuration.<br>"
|
"configuration.<br>"
|
||||||
"You can use a tool like <i><a href=""http://qjackctl.sourceforge.net"">QJackCtl</a></i> "
|
"You can use a tool like <i><a href=""http://qjackctl.sourceforge.net"">QJackCtl</a></i> "
|
||||||
"to adjust the Jack server settings." ) );
|
"to adjust the Jack server settings." ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !ports[1] )
|
|
||||||
{
|
|
||||||
throw CGenErr ( tr ( "There are no physical playback ports available. "
|
|
||||||
"This software requires at least one stereo output channel available. "
|
|
||||||
"Maybe you have selected the wrong sound card in the Jack server "
|
|
||||||
"configuration.<br>"
|
|
||||||
"You can use a tool like <i><a href=""http://qjackctl.sourceforge.net"">QJackCtl</a></i> "
|
|
||||||
"to adjust the Jack server settings." ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( jack_connect ( pJackClient, jack_port_name ( output_port_left ), ports[0] ) )
|
if ( jack_connect ( pJackClient, jack_port_name ( output_port_left ), ports[0] ) )
|
||||||
{
|
{
|
||||||
throw CGenErr ( tr ( "Cannot connect the Jack output ports." ) );
|
throw CGenErr ( tr ( "Cannot connect the Jack output ports." ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// before connecting the second stereo channel, check if the output is not
|
||||||
|
// mono
|
||||||
|
if ( ports[1] )
|
||||||
|
{
|
||||||
if ( jack_connect ( pJackClient, jack_port_name ( output_port_right ), ports[1] ) )
|
if ( jack_connect ( pJackClient, jack_port_name ( output_port_right ), ports[1] ) )
|
||||||
{
|
{
|
||||||
throw CGenErr ( tr ( "Cannot connect the Jack output ports." ) );
|
throw CGenErr ( tr ( "Cannot connect the Jack output ports." ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
free ( ports );
|
free ( ports );
|
||||||
}
|
}
|
||||||
|
@ -302,4 +295,3 @@ void CSound::shutdownCallback ( void* )
|
||||||
"solve the issue." ) );
|
"solve the issue." ) );
|
||||||
}
|
}
|
||||||
#endif // WITH_SOUND
|
#endif // WITH_SOUND
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue