Skip to content
Browse files

Fix JACK playback, change default JACK output device

  • Loading branch information...
1 parent 56c746e commit b7472e37172707572427dc958d9eaf8299cf1d26 @jyavenard jyavenard committed
Showing with 8 additions and 9 deletions.
  1. +1 −1 mythtv/libs/libmyth/audio/audiooutput.cpp
  2. +7 −8 mythtv/libs/libmyth/audio/audiooutputjack.cpp
View
2 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)
View
15 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;
}

0 comments on commit b7472e3

Please sign in to comment.
Something went wrong with that request. Please try again.