summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2011-09-30 01:00:12 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2011-09-30 01:00:12 (GMT)
commitb7472e37172707572427dc958d9eaf8299cf1d26 (patch)
tree849299412f907055c2f6ad7214acdde3d465a9c1
parent56c746e9fdfd3abad69be59d5f37ccdefc6b3c46 (diff)
Fix JACK playback, change default JACK output device
-rw-r--r--mythtv/libs/libmyth/audio/audiooutput.cpp2
-rw-r--r--mythtv/libs/libmyth/audio/audiooutputjack.cpp15
2 files changed, 8 insertions, 9 deletions
diff --git a/mythtv/libs/libmyth/audio/audiooutput.cpp b/mythtv/libs/libmyth/audio/audiooutput.cpp
index df64c24..443343d 100644
--- a/mythtv/libs/libmyth/audio/audiooutput.cpp
+++ b/mythtv/libs/libmyth/audio/audiooutput.cpp
@@ -392,7 +392,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/audio/audiooutputjack.cpp b/mythtv/libs/libmyth/audio/audiooutputjack.cpp
index 25f1f0d..add169e 100644
--- a/mythtv/libs/libmyth/audio/audiooutputjack.cpp
+++ b/mythtv/libs/libmyth/audio/audiooutputjack.cpp
@@ -555,7 +555,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(),
@@ -567,23 +568,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;
}