2
0

BsAudio.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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] streamSize Size of the audio data in the provided stream, in bytes.
  21. * @param[in] numSamples Number of samples in @p samples stream.
  22. * @param[in] desc Descriptor describing the type of the audio stream (format, sample rate, etc.).
  23. * @return Newly created AudioClip. Must be manually initialized.
  24. */
  25. virtual SPtr<AudioClip> createClip(const SPtr<DataStream>& samples, UINT32 streamSize, UINT32 numSamples,
  26. const AUDIO_CLIP_DESC& desc) = 0;
  27. };
  28. /** Provides easier access to Audio. */
  29. BS_CORE_EXPORT Audio& gAudio();
  30. /** @} */
  31. }