Clarify usage of Mixer->audioDevName()
This commit is contained in:
@@ -158,6 +158,9 @@ public:
|
||||
|
||||
|
||||
// audio-device-stuff
|
||||
|
||||
// Returns the current audio device's name. This is not necessarily
|
||||
// the user's preferred audio device, in case you were thinking that.
|
||||
inline const QString & audioDevName() const
|
||||
{
|
||||
return m_audioDevName;
|
||||
|
||||
@@ -65,15 +65,16 @@ MidiJack::MidiJack() :
|
||||
m_output_port( NULL ),
|
||||
m_quit( false )
|
||||
{
|
||||
// if jack is used for audio then we share the connection
|
||||
// if jack is currently used for audio then we share the connection
|
||||
// AudioJack creates and maintains the jack connection
|
||||
// and also handles the callback, we pass it our address
|
||||
// so that we can also process during the callback
|
||||
|
||||
if(Engine::mixer()->audioDevName() == AudioJack::name() )
|
||||
m_jackAudio = dynamic_cast<AudioJack*>(Engine::mixer()->audioDev());
|
||||
if( m_jackAudio )
|
||||
{
|
||||
// if a jack connection has been created for audio we use that
|
||||
m_jackAudio = dynamic_cast<AudioJack*>(Engine::mixer()->audioDev())->addMidiClient(this);
|
||||
m_jackAudio->addMidiClient(this);
|
||||
}else{
|
||||
m_jackAudio = NULL;
|
||||
m_jackClient = jack_client_open(probeDevice().toLatin1().data(),
|
||||
|
||||
@@ -808,6 +808,7 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
|
||||
m_audioInterfaces->addItem( it.key() );
|
||||
}
|
||||
|
||||
// If no preferred audio device is saved, save the current one
|
||||
QString audioDevName =
|
||||
ConfigManager::inst()->value( "mixer", "audiodev" );
|
||||
if( audioDevName.length() == 0 )
|
||||
|
||||
Reference in New Issue
Block a user