summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2011-09-30 01:04:49 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2011-09-30 01:04:49 (GMT)
commit7713fdfec5fab81fd184fdf3479d30a90bec34ec (patch)
tree5b1ee32a099aa2bfc8ad3c23550ab3cc5fb86075
parentf006f90474096f73aedb4f4fdbbe7777e37656cf (diff)
Fix JACK playback, change default JACK output device
Backport b7472e3
-rw-r--r--mythtv/libs/libmyth/audiooutput.cpp2
-rw-r--r--mythtv/libs/libmyth/audiooutputjack.cpp15
2 files changed, 8 insertions, 9 deletions
diff --git a/mythtv/libs/libmyth/audiooutput.cpp b/mythtv/libs/libmyth/audiooutput.cpp
index 0abe717..adad8a7 100644
--- a/mythtv/libs/libmyth/audiooutput.cpp
+++ b/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)
diff --git a/mythtv/libs/libmyth/audiooutputjack.cpp b/mythtv/libs/libmyth/audiooutputjack.cpp
index b40a677..c9f20d9 100644
--- a/mythtv/libs/libmyth/audiooutputjack.cpp
+++ b/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;
}