Permalink
Browse files

Fix JACK playback, change default JACK output device

Backport b7472e3
  • Loading branch information...
1 parent f006f90 commit 7713fdfec5fab81fd184fdf3479d30a90bec34ec @jyavenard jyavenard committed Sep 30, 2011
Showing with 8 additions and 9 deletions.
  1. +1 −1 mythtv/libs/libmyth/audiooutput.cpp
  2. +7 −8 mythtv/libs/libmyth/audiooutputjack.cpp
View
2 mythtv/libs/libmyth/audiooutput.cpp
@@ -368,7 +368,7 @@ AudioOutput::ADCVect* AudioOutput::GetOutputList(void)
#endif
#ifdef USING_JACK
{
- QString name = "JACK:output";
+ QString name = "JACK:";
QString desc = "Use JACK default sound server.";
adc = GetAudioDeviceConfig(name, desc);
if (adc)
View
15 mythtv/libs/libmyth/audiooutputjack.cpp
@@ -554,7 +554,8 @@ jack_client_t* AudioOutputJACK::_jack_client_open(void)
{
jack_client_t* client = NULL;
QString client_name = QString("mythtv_%1").arg(getpid());
- jack_options_t open_options = JackNullOption;
+ jack_options_t open_options =
+ (jack_options_t)(JackUseExactName | JackNoStartServer);
jack_status_t open_status;
client = jack_client_open(client_name.toAscii().constData(),
@@ -566,23 +567,21 @@ jack_client_t* AudioOutputJACK::_jack_client_open(void)
const char** AudioOutputJACK::_jack_get_ports(void)
{
const char **matching_ports = NULL;
- unsigned long port_flags=JackPortIsPhysical;
- QString port_name;
+ unsigned long port_flags=JackPortIsInput;
+ const char *port_name = NULL;
// Have we been given a target port to connect to
if (!main_device.isEmpty())
{
- port_flags = 0;
- port_name = main_device;
+ port_name = main_device.toAscii().constData();
}
else
{
- port_flags=JackPortIsPhysical;
+ port_flags |= JackPortIsPhysical;
}
// list matching ports
- matching_ports = jack_get_ports(client, port_name.toAscii().constData(),
- NULL, port_flags);
+ matching_ports = jack_get_ports(client, port_name, NULL, port_flags);
return matching_ports;
}

0 comments on commit 7713fdf

Please sign in to comment.