2 * Copyright 2003-2013, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
8 * Puck Meerburg, puck@puckipedia.nl
10 #ifndef MIXER_CONTROL_H
11 #define MIXER_CONTROL_H
14 #include <MediaRoster.h>
16 class BContinuousParameter
;
20 // The volume which choices
21 #define VOLUME_USE_MIXER 0 // default
22 #define VOLUME_USE_PHYS_OUTPUT 1
27 MixerControl(int32 volumeWhich
= VOLUME_USE_MIXER
);
30 bool Connect(int32 volumeWhich
, float* _value
= NULL
,
31 const char** _error
= NULL
);
34 int32
VolumeWhich() const;
37 void SetVolume(float volume
);
38 void ChangeVolumeBy(float value
);
40 void SetMute(bool muted
);
43 float Minimum() const { return fMin
; }
44 float Maximum() const { return fMax
; }
46 media_node
GainNode() { return fGainMediaNode
; }
52 media_node fGainMediaNode
;
53 BParameterWeb
* fParameterWeb
;
54 BContinuousParameter
* fMixerParameter
;
55 BParameter
* fMuteParameter
;
61 #endif // MIXER_CONTROL_H