1 // mixctl.h - MixCtl class provides control of audio mixer functions
4 // Copyright (C) 1998 Sam Hawker <shawkie@geocities.com>
5 // Copyright (C) 2002 Gordon Fraser <gordon@debian.org>
6 // This software comes with ABSOLUTELY NO WARRANTY
7 // This software is free software, and you are welcome to redistribute it
8 // under certain conditions
9 // See the COPYING file for details.
17 #include <sys/ioctl.h>
18 #include <sys/types.h>
24 #include <soundcard.h>
26 #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
27 #include <sys/soundcard.h>
30 #include <linux/soundcard.h>
32 #ifdef __GNU__ // Hurd
33 #include <sys/soundcard.h>
36 #include "exception.h"
38 //----------------------------------------------------------------------
51 typedef struct _MixerDevice_ MixerDevice
;
53 //----------------------------------------------------------------------
62 unsigned num_devices_
; // maximum number of devices
63 int devmask
; // supported devices
64 int stmask
; // stereo devices
65 int recmask
; // devices which can be recorded from
66 int caps
; // capabilities
67 int recsrc
; // devices which are being recorded from
69 MixerDevice
* mixer_devices_
;
74 MixCtl(char *dname
) throw(MixerDeviceException
);
76 int readVol(int, bool);
81 void setVol(int, int);
82 void setBoth(int, int, int);
83 void setLeft(int, int);
84 void setRight(int, int);
86 bool readRec(int, bool);
88 void setRec(int, bool);
91 unsigned getNrDevices();
92 int getCapabilities();
105 #endif // __mixctl_h__