PageRenderTime 73ms CodeModel.GetById 39ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_STREAMINGAUDIO_H
  28. #define LL_STREAMINGAUDIO_H
  29. #include "stdtypes.h" // from llcommon
  30. // Entirely abstract. Based exactly on the historic API.
  31. class LLStreamingAudioInterface
  32. {
  33. public:
  34. virtual ~LLStreamingAudioInterface() {}
  35. virtual void start(const std::string& url) = 0;
  36. virtual void stop() = 0;
  37. virtual void pause(int pause) = 0;
  38. virtual void update() = 0;
  39. virtual int isPlaying() = 0;
  40. // use a value from 0.0 to 1.0, inclusive
  41. virtual void setGain(F32 vol) = 0;
  42. virtual F32 getGain() = 0;
  43. virtual std::string getURL() = 0;
  44. };
  45. #endif // LL_STREAMINGAUDIO_H