PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/TCSystem/Modules/Audio/src/TCAudioSoundSequenceImp.h

https://bitbucket.org/the____tiger/tcfilesync
C++ Header | 107 lines | 45 code | 15 blank | 47 comment | 0 complexity | 9e34702d71dc2d3eb7b95dc4d5064f06 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_SEQUENCE_IMP_H_
  36. #define _TC_AUDIO_SOUND_SEQUENCE_IMP_H_
  37. #include "TCAudioSoundCompound.h"
  38. #include "TCAudioSoundDataSequence.h"
  39. #include "TCAudioSoundDataMapper.h"
  40. #include "TCAudioSoundPlayer.h"
  41. #include <vector>
  42. namespace tc
  43. {
  44. namespace audio
  45. {
  46. /**
  47. * @addtogroup TC_AUDIO_IMP
  48. * @{
  49. */
  50. /**
  51. * @file
  52. * @brief This file provides the definition of tc::audio::SoundSequenceImp
  53. *
  54. * @author Thomas Goessler
  55. */
  56. /**
  57. * @brief Implementation of the Sound interface for a sound sequence
  58. */
  59. class TC_DLL_LOCAL SoundSequenceImp: public SoundCompound
  60. {
  61. public:
  62. SoundSequenceImp(SoundDataSequencePtr sound_data,
  63. SoundPlayerPtr sound_player,
  64. SoundDataMapperPtr sound_data_mapper);
  65. virtual ~SoundSequenceImp();
  66. virtual bool IsPlaying() const;
  67. virtual bool IsPaused() const;
  68. virtual bool IsStopped() const;
  69. virtual bool Play();
  70. virtual bool Pause();
  71. virtual bool Stop();
  72. virtual bool IsLooping() const;
  73. virtual void SetLooping(bool looping);
  74. virtual const SoundFormat& GetFormat() const;
  75. virtual double GetVolume() const;
  76. virtual double SetVolume(double vol);
  77. virtual double GetPitch() const;
  78. virtual double SetPitch(double pitch);
  79. virtual double GetPan() const;
  80. virtual double SetPan(double pan);
  81. virtual uint32_t GetNumSounds() const;
  82. virtual SoundPtr GetSound(uint32_t idx);
  83. virtual bool AddSound(SoundPtr sound);
  84. virtual bool RemoveSound(SoundPtr sound);
  85. private:
  86. SoundDataSequencePtr m_sound_data;
  87. SoundPlayerPtr m_sound_player;
  88. SoundDataMapperPtr m_sound_data_mapper;
  89. };
  90. }
  91. }
  92. #endif // _TC_AUDIO_SOUND_SEQUENCE_IMP_H_