BsAudio.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsModule.h"
  6. namespace BansheeEngine
  7. {
  8. /** @addtogroup Audio
  9. * @{
  10. */
  11. /** Provides global functionality relating to sounds and music. */
  12. class BS_CORE_EXPORT Audio : public Module<Audio>
  13. {
  14. protected:
  15. friend class AudioClip;
  16. /**
  17. * Creates a new audio clip.
  18. *
  19. * @param[in] samples Stream containing audio samples in format specified in @p desc.
  20. * @param[in] numSamples Number of samples in @p samples stream.
  21. * @param[in] desc Descriptor describing the type of the audio stream (format, sample rate, etc.).
  22. * @return Newly created AudioClip. Must be manually initialized.
  23. */
  24. virtual SPtr<AudioClip> createClip(const SPtr<DataStream>& samples, UINT32 numSamples,
  25. const AUDIO_CLIP_DESC& desc) = 0;
  26. };
  27. /** Provides easier access to Audio. */
  28. BS_CORE_EXPORT Audio& gAudio();
  29. /** @} */
  30. }