tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / bin / desklink / MixerControl.h
blob62d2dca621f82ecbcfcad5fe159dbc73bf544581
1 /*
2 * Copyright 2003-2013, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Jérôme Duval
7 * François Revol
8 * Puck Meerburg, puck@puckipedia.nl
9 */
10 #ifndef MIXER_CONTROL_H
11 #define MIXER_CONTROL_H
14 #include <MediaRoster.h>
16 class BContinuousParameter;
17 class BParameter;
18 class BParameterWeb;
20 // The volume which choices
21 #define VOLUME_USE_MIXER 0 // default
22 #define VOLUME_USE_PHYS_OUTPUT 1
25 class MixerControl {
26 public:
27 MixerControl(int32 volumeWhich = VOLUME_USE_MIXER);
28 ~MixerControl();
30 bool Connect(int32 volumeWhich, float* _value = NULL,
31 const char** _error = NULL);
32 bool Connected();
34 int32 VolumeWhich() const;
35 float Volume() const;
37 void SetVolume(float volume);
38 void ChangeVolumeBy(float value);
40 void SetMute(bool muted);
41 bool Mute();
43 float Minimum() const { return fMin; }
44 float Maximum() const { return fMax; }
46 media_node GainNode() { return fGainMediaNode; }
48 private:
49 void _Disconnect();
51 int32 fVolumeWhich;
52 media_node fGainMediaNode;
53 BParameterWeb* fParameterWeb;
54 BContinuousParameter* fMixerParameter;
55 BParameter* fMuteParameter;
56 float fMin;
57 float fMax;
58 float fStep;
61 #endif // MIXER_CONTROL_H