PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/media_plugins/webkit/volume_catcher.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 54 lines | 16 code | 9 blank | 29 comment | 0 complexity | d9d3ce1b4108bd8a00c2d995de5962b2 MD5 | raw file
 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=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 * @endcond
27 */
28
29#ifndef VOLUME_CATCHER_H
30#define VOLUME_CATCHER_H
31
32#include "linden_common.h"
33
34class VolumeCatcherImpl;
35
36class VolumeCatcher
37{
38 public:
39	VolumeCatcher();
40	~VolumeCatcher();
41
42	void setVolume(F32 volume); // 0.0 - 1.0
43	
44	// Set the left-right pan of audio sources
45	// where -1.0 = left, 0 = center, and 1.0 = right
46	void setPan(F32 pan); 
47
48	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
49	
50 private:
51	VolumeCatcherImpl *pimpl;
52};
53
54#endif // VOLUME_CATCHER_H