1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
#ifndef __MIXER_IFACE_H
#define __MIXER_IFACE_H
#include <dcopobject.h>
class MixerIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
/**
Sets the volume of the device with index deviceidx to the percentage
specified in the second parameter. The deviceidx is got from the array
at the start of mixer_oss.cpp .
*/
virtual void setVolume( int deviceidx, int percentage )=0;
/**
A simpler way to access the master volume (which is deviceidx 0).
*/
virtual void setMasterVolume( int percentage )=0;
/**
Increase the volume of the given device by a given percentage.
*/
virtual void increaseVolume( int deviceidx, int percentage )=0;
/**
Decrease the volume of the given device by a a given percentage.
*/
virtual void decreaseVolume( int deviceidx, int percentage )=0;
/**
Returns the volume of the device (as a percentage, 0..100).
*/
virtual int volume( int deviceidx )=0;
/**
Returns the volume of the master device (as a percentage, 0..100).
*/
virtual int masterVolume()=0;
/**
Sets the absolute volume of the device. Lower bound is absoluteVolumeMin(),
upper bound is absoluteVolumeMax().
*/
virtual void setAbsoluteVolume( int deviceidx, long absoluteVolume )=0;
/**
Returns the absolute volume of the device. The volume is in the range of
absoluteVolumeMin() <= absoluteVolume() <= absoluteVolumeMax()
*/
virtual long absoluteVolume( int deviceidx )=0;
/**
Returns the absolute maximum volume of the device.
*/
virtual long absoluteVolumeMin( int deviceidx )=0;
/**
Returns the absolute minimum volume of the device.
*/
virtual long absoluteVolumeMax( int deviceidx )=0;
/**
Mutes or unmutes the specified device.
*/
virtual void setMute( int deviceidx, bool on )=0;
/**
Mutes or unmutes the master device.
*/
virtual void setMasterMute( bool on )=0;
/**
Toggles mute-state for the given device.
*/
virtual void toggleMute( int deviceidx )=0;
/**
Toggles mute-state for the master device.
*/
virtual void toggleMasterMute()=0;
/**
Returns if the given device is muted or not. If the device is not
available in this mixer, it is reported as muted.
*/
virtual bool mute( int deviceidx )=0;
/**
Returns if the master device is muted or not. If the device is not
available in this mixer, it is reported as muted.
*/
virtual bool masterMute()=0;
/**
Returns the index of the master device
*/
virtual int masterDeviceIndex()=0;
/**
Makes the given device a record source.
*/
virtual void setRecordSource( int deviceidx, bool on )=0;
/**
Returns if the given device is a record source.
*/
virtual bool isRecordSource( int deviceidx )=0;
/**
Sets the balance of the master device (negative means balanced to the left
speaker and positive to the right one)
*/
virtual void setBalance( int balance )=0;
/**
Returns true if the given device is available in the current mixer
and false if it's not.
*/
virtual bool isAvailableDevice( int deviceidx )=0;
/**
Returns the name of the mixer.
*/
virtual TQString mixerName()=0;
/**
* Open/grab the mixer for further intraction
* You should use this method after a prior call of close(). See close() for usage directions.
*/
virtual int open()=0;
/**
* Close/release the mixer
* This method SHOULD NOT be used via DCOP. You MAY use it if you really need to close the mixer device,
* for example when a software suspend action (ACPI) takes place, and the soundcard driver
* doesn't handle this situation gracefully.
*/
virtual int close()=0;
};
#endif
|