2 * Copyright 2005, Jérôme Duval. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Inspired by SoundCapture from Be newsletter (Media Kit Basics: Consumers and Producers)
13 #include <SoundPlayer.h>
15 class VolumeSlider
: public BControl
18 VolumeSlider(BRect rect
, const char* title
, uint32 resizeFlags
);
20 virtual void Draw(BRect
);
21 virtual void MouseMoved(BPoint point
, uint32 transit
, const BMessage
*message
);
22 virtual void MouseUp(BPoint point
);
23 virtual void MouseDown(BPoint point
);
24 void SetSoundPlayer(BSoundPlayer
*player
);
26 void _UpdateVolume(BPoint point
);
28 BBitmap fLeftBitmap
, fRightBitmap
, fButtonBitmap
;
31 BSoundPlayer
*fSoundPlayer
;
34 class SpeakerView
: public BBox
37 SpeakerView(BRect rect
, uint32 resizeFlags
);
39 void Draw(BRect updateRect
);
42 BBitmap fSpeakerBitmap
;