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

/indra/llaudio/llstreamingaudio.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 50 lines | 17 code | 5 blank | 28 comment | 0 complexity | 55f1a3c11aa390d050f6723f1ebf9597 MD5 | raw file
 1/** 
 2 * @file streamingaudio.h
 3 * @author Tofu Linden
 4 * @brief Definition of LLStreamingAudioInterface base class abstracting the streaming audio interface
 5 *
 6 * $LicenseInfo:firstyear=2009&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 */
27
28#ifndef LL_STREAMINGAUDIO_H
29#define LL_STREAMINGAUDIO_H
30
31#include "stdtypes.h" // from llcommon
32
33// Entirely abstract.  Based exactly on the historic API.
34class LLStreamingAudioInterface
35{
36 public:
37	virtual ~LLStreamingAudioInterface() {}
38
39	virtual void start(const std::string& url) = 0;
40	virtual void stop() = 0;
41	virtual void pause(int pause) = 0;
42	virtual void update() = 0;
43	virtual int isPlaying() = 0;
44	// use a value from 0.0 to 1.0, inclusive
45	virtual void setGain(F32 vol) = 0;
46	virtual F32 getGain() = 0;
47	virtual std::string getURL() = 0;
48};
49
50#endif // LL_STREAMINGAUDIO_H