Merge branch 'master' into fx-mixer-rework

This commit is contained in:
Tobias Doerffel
2009-10-26 00:24:45 +01:00
50 changed files with 36369 additions and 69846 deletions

View File

@@ -0,0 +1,62 @@
/*
* AlsaDeviceListModel - allows quick access to a list of alsa devices
*
* Copyright (c) 2009 Paul Giblock <pgib/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _ALSA_DEVICE_LIST_MODEL
#define _ALSA_DEVICE_LIST_MODEL
#include "lmmsconfig.h"
#ifdef LMMS_HAVE_ALSA
#include <alsa/asoundlib.h>
#include "QAbstractListModel"
class AlsaDeviceListModel : public QAbstractListModel
{
public:
AlsaDeviceListModel(
snd_rawmidi_stream_t _stream, QObject * _parent );
AlsaDeviceListModel(
snd_pcm_stream_t _stream, QObject * _parent );
AlsaDeviceListModel( QObject * _parent );
protected:
void init( const char * _iface, const char * _filter );
int rowCount( const QModelIndex & parent = QModelIndex() ) const;
QVariant data( const QModelIndex & index,
int role = Qt::DisplayRole ) const;
private:
typedef QPair<QString,QString> StringPair;
typedef QList<StringPair> DeviceList;
DeviceList m_devices;
};
#endif // LMMS_HAVE_ALSA
#endif

View File

@@ -38,7 +38,7 @@
class lcdSpinBox;
class QLineEdit;
class QComboBox;
class AudioAlsa : public AudioDevice, public QThread
@@ -54,7 +54,7 @@ public:
}
static QString probeDevice();
class setupWidget : public AudioDevice::setupWidget
{
@@ -65,9 +65,14 @@ public:
virtual void saveSettings();
private:
QLineEdit * m_device;
QComboBox * m_device;
lcdSpinBox * m_channels;
void poo(const QString & s)
{
printf("Got %s\n", qPrintable( s ) );
}
} ;

View File

@@ -37,7 +37,7 @@
struct pollfd;
class QLineEdit;
class QComboBox;
class MidiAlsaRaw : public MidiClientRaw , public QThread
@@ -65,7 +65,7 @@ public:
virtual void saveSettings();
private:
QLineEdit * m_device;
QComboBox * m_device;
} ;