Fixes most of stuff found in Wallacoloo's code review for #1600

Removal of a superfluous include in AudioAlsaSetupWidget.cpp

Removal of the function "bool hasCapabilities(char *device_name)" which
was not used anyway. It implemented a test for ALSA device capabilities
needed by LMMS (SND_PCM_ACCESS_RW_INTERLEAVED, SND_PCM_FORMAT_S16_LE,
etc.).

Corrected header name in AudioAlsaSetupWidget.h.

Created an implementation file for AudioDeviceSetupWidget to make more
clear that it's part of the GUI.

Fix build for builds that use Port Audio. The setup widget of
AudioPortAudio.h still inherited from AudioDevice::setupWidget instead
of the new AudioDeviceSetupWidget.
This commit is contained in:
Michael Gregorius
2015-06-28 00:24:23 +02:00
parent 37c4da81b5
commit 5a8dce2650
8 changed files with 50 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
/*
* AudioDeviceSetupWidget.h - Implements a setup widget for ALSA-PCM-output
* AudioAlsaSetupWidget.h - Implements a setup widget for ALSA-PCM-output
*
* Copyright (c) 2004-2015 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -57,7 +57,7 @@ private:
int m_selectedDevice;
AudioAlsa::DeviceInfoCollection m_deviceInfos;
} ;
};
#endif

View File

@@ -31,24 +31,13 @@
class AudioDeviceSetupWidget : public TabWidget
{
public:
AudioDeviceSetupWidget( const QString & _caption, QWidget * _parent ) :
TabWidget( TabWidget::tr( "Settings for %1" ).arg(
TabWidget::tr( _caption.toLatin1() ) ).
toUpper(), _parent )
{
}
AudioDeviceSetupWidget( const QString & _caption, QWidget * _parent );
virtual ~AudioDeviceSetupWidget()
{
}
virtual ~AudioDeviceSetupWidget();
virtual void saveSettings() = 0;
virtual void show()
{
parentWidget()->show();
QWidget::show();
}
virtual void show();
};

View File

@@ -52,6 +52,7 @@ public:
#endif
#include "AudioDevice.h"
#include "AudioDeviceSetupWidget.h"
#if defined paNeverDropInput || defined paNonInterleaved
# define PORTAUDIO_V19
@@ -81,7 +82,7 @@ public:
unsigned long _framesPerBuffer );
class setupWidget : public AudioDevice::setupWidget
class setupWidget : public AudioDeviceSetupWidget
{
public:
setupWidget( QWidget * _parent );