PageRenderTime 26ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/TCSystem/Modules/Audio/src/TCAudioSoundImp.h

https://bitbucket.org/the____tiger/tcfilesync
C++ Header | 94 lines | 36 code | 11 blank | 47 comment | 0 complexity | 8a6aee6b0e9d8720a759fe58427e82ae MD5 | raw file
Possible License(s): LGPL-2.1
  1. //*******************************************************************************
  2. //
  3. // ******* *** *** *
  4. // * * * *
  5. // * * * *****
  6. // * * *** * * ** * ** ***
  7. // * * * * * * * **** * * *
  8. // * * * * * * * * * * *
  9. // * *** *** * ** ** ** * *
  10. // *
  11. //*******************************************************************************
  12. // see http://sourceforge.net/projects/tcsystem/ for details.
  13. // Copyright (C) 2003 - 2012 Thomas Goessler. All Rights Reserved.
  14. //*******************************************************************************
  15. //
  16. // TCSystem is the legal property of its developers.
  17. // Please refer to the COPYRIGHT file distributed with this source distribution.
  18. //
  19. // This library is free software; you can redistribute it and/or
  20. // modify it under the terms of the GNU Lesser General Public
  21. // License as published by the Free Software Foundation; either
  22. // version 2.1 of the License, or (at your option) any later version.
  23. //
  24. // This library is distributed in the hope that it will be useful,
  25. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  27. // Lesser General Public License for more details.
  28. //
  29. // You should have received a copy of the GNU Lesser General Public
  30. // License along with this library; if not, write to the Free Software
  31. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  32. //*******************************************************************************
  33. // $Id$
  34. //*******************************************************************************
  35. #ifndef _TC_AUDIO_SOUND_IMP_H_
  36. #define _TC_AUDIO_SOUND_IMP_H_
  37. #include "TCAudioSound.h"
  38. #include "TCAudioSoundData.h"
  39. #include "TCAudioSoundPlayer.h"
  40. namespace tc
  41. {
  42. namespace audio
  43. {
  44. /**
  45. * @addtogroup TC_AUDIO_IMP
  46. * @{
  47. */
  48. /**
  49. * @file
  50. * @brief This file provides the definition of tc::audio::SoundImp
  51. *
  52. * @author Thomas Goessler
  53. */
  54. /**
  55. * @brief Implementation of the Sound interface for a single sound
  56. */
  57. class TC_DLL_LOCAL SoundImp: public Sound
  58. {
  59. public:
  60. SoundImp(SoundDataPtr sound_data, SoundPlayerPtr sound_player);
  61. virtual ~SoundImp();
  62. virtual bool IsPlaying() const;
  63. virtual bool IsPaused() const;
  64. virtual bool IsStopped() const;
  65. virtual bool Play();
  66. virtual bool Pause();
  67. virtual bool Stop();
  68. virtual bool IsLooping() const;
  69. virtual void SetLooping(bool looping);
  70. virtual const SoundFormat& GetFormat() const;
  71. virtual double GetVolume() const;
  72. virtual double SetVolume(double vol);
  73. virtual double GetPitch() const;
  74. virtual double SetPitch(double pitch);
  75. virtual double GetPan() const;
  76. virtual double SetPan(double pan);
  77. private:
  78. SoundDataPtr m_sound_data;
  79. SoundPlayerPtr m_sound_player;
  80. };
  81. }
  82. }
  83. #endif // _TC_AUDIO_SOUND_IMP_H_