2
* KMix -- KDE's full featured mini mixer
5
* Copyright (C) 1996-2000 Christian Esken
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Library General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Library General Public License for more details.
18
* You should have received a copy of the GNU Library General Public
19
* License along with this program; if not, write to the Free
20
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
/* This code is being #include'd from mixer.cpp */
26
#include <config-alsa.h>
28
#include "mixer_backend.h"
29
#include "core/mixer.h"
35
#if defined(sun) || defined(__sun__)
40
#include <sys/fcntl.h>
46
#ifdef HAVE_LIBASOUND2
57
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(_UNIXWARE)
62
# if defined(HAVE_ALIB_H)
66
# warning ** YOU NEED to have libAlib installed to use the HP-UX-Mixer **
68
# endif // HAVE_ALIB_H
71
// PORTING: add #ifdef PLATFORM , commands , #endif, add your new mixer below
73
#if defined(SUN_MIXER)
74
#include "backends/mixer_sun.cpp"
77
#if defined(IRIX_MIXER)
78
#include "backends/mixer_irix.cpp"
82
#if defined(ALSA_MIXER)
83
#include "backends/mixer_alsa9.cpp"
87
#if defined(PULSE_MIXER)
88
#include "backends/mixer_pulse.cpp"
92
#if defined(OSS_MIXER)
93
#include "backends/mixer_oss.cpp"
95
#if !defined(__NetBSD__) && !defined(__OpenBSD__)
96
#include <sys/soundcard.h>
98
#include <soundcard.h>
100
#if !defined(__FreeBSD__) && SOUND_VERSION >= 0x040000
105
#if defined(OSS4_MIXER)
106
#include "backends/mixer_oss4.cpp"
109
#if defined(HPUX_MIXER)
110
#include "backends/mixer_hpux.cpp"
114
typedef Mixer_Backend *getMixerFunc( Mixer* mixer, int device );
115
typedef QString getDriverNameFunc( );
117
struct MixerFactory {
118
getMixerFunc *getMixer;
119
getDriverNameFunc *getDriverName;
122
MixerFactory g_mixerFactories[] = {
124
#if defined(SUN_MIXER)
125
{ SUN_getMixer, SUN_getDriverName },
128
#if defined(IRIX_MIXER)
129
{ IRIX_getMixer, IRIX_getDriverName },
132
#if defined(PULSE_MIXER)
133
{ PULSE_getMixer, PULSE_getDriverName },
136
#if defined(ALSA_MIXER)
137
{ ALSA_getMixer, ALSA_getDriverName },
140
#if defined(OSS_MIXER)
141
{ OSS_getMixer, OSS_getDriverName },
144
#if defined(OSS4_MIXER)
145
{ OSS4_getMixer, OSS4_getDriverName },
148
#if defined(HPUX_MIXER)
149
{ HPUX_getMixer, HPUX_getDriverName },