diff options
Diffstat (limited to 'linden/indra/media_plugins/webkit/volume_catcher.h')
-rw-r--r-- | linden/indra/media_plugins/webkit/volume_catcher.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/linden/indra/media_plugins/webkit/volume_catcher.h b/linden/indra/media_plugins/webkit/volume_catcher.h new file mode 100644 index 0000000..855e99f --- /dev/null +++ b/linden/indra/media_plugins/webkit/volume_catcher.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /** | ||
2 | * @file volume_catcher.h | ||
3 | * @brief Interface to a class with platform-specific implementations that allows control of the audio volume of all sources in the current process. | ||
4 | * | ||
5 | * @cond | ||
6 | * $LicenseInfo:firstyear=2010&license=viewergpl$ | ||
7 | * | ||
8 | * Copyright (c) 2010, Linden Research, Inc. | ||
9 | * | ||
10 | * Second Life Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
12 | * to you under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
14 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
16 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
17 | * | ||
18 | * There are special exceptions to the terms and conditions of the GPL as | ||
19 | * it is applied to this Source Code. View the full text of the exception | ||
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
21 | * online at | ||
22 | * http://secondlife.com/developers/opensource/flossexception | ||
23 | * | ||
24 | * By copying, modifying or distributing this software, you acknowledge | ||
25 | * that you have read and understood your obligations described above, | ||
26 | * and agree to abide by those obligations. | ||
27 | * | ||
28 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
29 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
30 | * COMPLETENESS OR PERFORMANCE. | ||
31 | * $/LicenseInfo$ | ||
32 | * | ||
33 | * @endcond | ||
34 | */ | ||
35 | |||
36 | #ifndef VOLUME_CATCHER_H | ||
37 | #define VOLUME_CATCHER_H | ||
38 | |||
39 | #include "linden_common.h" | ||
40 | |||
41 | class VolumeCatcherImpl; | ||
42 | |||
43 | class VolumeCatcher | ||
44 | { | ||
45 | public: | ||
46 | VolumeCatcher(); | ||
47 | ~VolumeCatcher(); | ||
48 | |||
49 | void setVolume(F32 volume); // 0.0 - 1.0 | ||
50 | |||
51 | // Set the left-right pan of audio sources | ||
52 | // where -1.0 = left, 0 = center, and 1.0 = right | ||
53 | void setPan(F32 pan); | ||
54 | |||
55 | void pump(); // call this at least a few times a second if you can - it affects how quickly we can 'catch' a new audio source and adjust its volume | ||
56 | |||
57 | private: | ||
58 | VolumeCatcherImpl *pimpl; | ||
59 | }; | ||
60 | |||
61 | #endif // VOLUME_CATCHER_H | ||