AudioClip.generated.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Audio
  7. * @{
  8. */
  9. /// <summary>
  10. /// Audio clip stores audio data in a compressed or uncompressed format. Clips can be provided to audio sources or other
  11. /// audio methods to be played.
  12. /// </summary>
  13. public partial class AudioClip : Resource
  14. {
  15. private AudioClip(bool __dummy0) { }
  16. protected AudioClip() { }
  17. /// <summary>Returns the size of a single sample, in bits.</summary>
  18. public uint BitDepth
  19. {
  20. get { return Internal_getBitDepth(mCachedPtr); }
  21. }
  22. /// <summary>Returns how many samples per second is the audio encoded in.</summary>
  23. public uint SampleRate
  24. {
  25. get { return Internal_getFrequency(mCachedPtr); }
  26. }
  27. /// <summary>Returns the number of channels provided by the clip.</summary>
  28. public uint NumChannels
  29. {
  30. get { return Internal_getNumChannels(mCachedPtr); }
  31. }
  32. /// <summary>Returns in which format is audio data stored in.</summary>
  33. public AudioFormat Format
  34. {
  35. get { return Internal_getFormat(mCachedPtr); }
  36. }
  37. /// <summary>Returns how is the audio data read/decoded.</summary>
  38. public AudioReadMode ReadMode
  39. {
  40. get { return Internal_getReadMode(mCachedPtr); }
  41. }
  42. /// <summary>Returns the length of the audio clip, in seconds.</summary>
  43. public float Duration
  44. {
  45. get { return Internal_getLength(mCachedPtr); }
  46. }
  47. /// <summary>Returns the total number of samples in the clip (includes all channels).</summary>
  48. public uint NumSamples
  49. {
  50. get { return Internal_getNumSamples(mCachedPtr); }
  51. }
  52. /// <summary>Determines will the clip be played a spatial 3D sound, or as a normal sound (for example music).</summary>
  53. public bool Is3D
  54. {
  55. get { return Internal_is3D(mCachedPtr); }
  56. }
  57. [MethodImpl(MethodImplOptions.InternalCall)]
  58. private static extern uint Internal_getBitDepth(IntPtr thisPtr);
  59. [MethodImpl(MethodImplOptions.InternalCall)]
  60. private static extern uint Internal_getFrequency(IntPtr thisPtr);
  61. [MethodImpl(MethodImplOptions.InternalCall)]
  62. private static extern uint Internal_getNumChannels(IntPtr thisPtr);
  63. [MethodImpl(MethodImplOptions.InternalCall)]
  64. private static extern AudioFormat Internal_getFormat(IntPtr thisPtr);
  65. [MethodImpl(MethodImplOptions.InternalCall)]
  66. private static extern AudioReadMode Internal_getReadMode(IntPtr thisPtr);
  67. [MethodImpl(MethodImplOptions.InternalCall)]
  68. private static extern float Internal_getLength(IntPtr thisPtr);
  69. [MethodImpl(MethodImplOptions.InternalCall)]
  70. private static extern uint Internal_getNumSamples(IntPtr thisPtr);
  71. [MethodImpl(MethodImplOptions.InternalCall)]
  72. private static extern bool Internal_is3D(IntPtr thisPtr);
  73. }
  74. /** @} */
  75. }