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
#include "mixer_irix.h"
25
#error "The IRIX port is not maintained anymore, an no official part of KMix / KDE at this point of time! Please contact the current KMix maintainer if you would like to maintain the port."
27
Mixer_Backend* IRIX_getMixer(int devnum)
29
Mixer_Backend *l_mixer;
30
l_mixer = new Mixer_IRIX( devnum);
31
l_mixer->init(devnum);
37
Mixer_IRIX::Mixer_IRIX(int devnum) : Mixer_Backend(devnum)
42
int Mixer_IRIX::open()
45
m_config = ALnewconfig();
46
if (m_config == (ALconfig)0) {
47
cerr << "OpenAudioDevice(): ALnewconfig() failed\n";
48
return Mixer::ERR_OPEN;
51
m_port = ALopenport("XVDOPlayer", "w", m_config);
52
if (m_port == (ALport)0) {
53
return Mixer::ERR_OPEN;
56
// Mixer is open. Now define properties
60
stereodevs = 1+128+2048;
63
i_s_mixer_name = "HPUX Audio Mixer";
70
int Mixer_IRIX::close()
72
_pollingTimer->stop();
74
ALfreeconfig(m_config);
80
int Mixer_IRIX::readVolumeFromHW( int devnumi, Volume &vol, Volume & )
84
case 0: // Speaker Output
85
in_buf[0] = AL_RIGHT_SPEAKER_GAIN;
86
in_buf[2] = AL_LEFT_SPEAKER_GAIN;
88
case 7: // Microphone Input (actually selectable).
89
in_buf[0] = AL_RIGHT_INPUT_ATTEN;
90
in_buf[2] = AL_LEFT_INPUT_ATTEN;
92
case 11: // Record monitor
93
in_buf[0] = AL_RIGHT_MONITOR_ATTEN;
94
in_buf[2] = AL_LEFT_MONITOR_ATTEN;
97
printf("Unknown device %d\n", MixPtr->num() );
99
ALgetparams(AL_DEFAULT_DEVICE, in_buf, 4);
100
*VolRight = in_buf[1]*100/255;
101
*VolLeft = in_buf[3]*100/255;
106
int Mixer_IRIX::writeVolumeToHW( int devnum, Volume &vol, Volume & )
108
// Set volume (right&left)
114
switch( mixdevice->num() ) {
116
out_buf[0] = AL_RIGHT_SPEAKER_GAIN;
117
out_buf[2] = AL_LEFT_SPEAKER_GAIN;
119
case 7: // Microphone (Input)
120
out_buf[0] = AL_RIGHT_INPUT_ATTEN;
121
out_buf[2] = AL_LEFT_INPUT_ATTEN;
123
case 11: // Record monitor
124
out_buf[0] = AL_RIGHT_MONITOR_ATTEN;
125
out_buf[2] = AL_LEFT_MONITOR_ATTEN;
128
ALsetparams(AL_DEFAULT_DEVICE, out_buf, 4);
133
QString IRIX_getDriverName() {
137
QString Mixer_IRIX::getDriverName()