AudioClip.generated.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. [ShowInInspector]
  14. public partial class AudioClip : Resource
  15. {
  16. private AudioClip(bool __dummy0) { }
  17. protected AudioClip() { }
  18. /// <summary>Returns a reference wrapper for this resource.</summary>
  19. public RRef<AudioClip> Ref
  20. {
  21. get { return Internal_GetRef(mCachedPtr); }
  22. }
  23. /// <summary>Returns the size of a single sample, in bits.</summary>
  24. [ShowInInspector]
  25. [NativeWrapper]
  26. public uint BitDepth
  27. {
  28. get { return Internal_getBitDepth(mCachedPtr); }
  29. }
  30. /// <summary>Returns how many samples per second is the audio encoded in.</summary>
  31. [ShowInInspector]
  32. [NativeWrapper]
  33. public uint SampleRate
  34. {
  35. get { return Internal_getFrequency(mCachedPtr); }
  36. }
  37. /// <summary>Returns the number of channels provided by the clip.</summary>
  38. [ShowInInspector]
  39. [NativeWrapper]
  40. public uint NumChannels
  41. {
  42. get { return Internal_getNumChannels(mCachedPtr); }
  43. }
  44. /// <summary>Returns in which format is audio data stored in.</summary>
  45. [ShowInInspector]
  46. [NativeWrapper]
  47. public AudioFormat Format
  48. {
  49. get { return Internal_getFormat(mCachedPtr); }
  50. }
  51. /// <summary>Returns how is the audio data read/decoded.</summary>
  52. [ShowInInspector]
  53. [NativeWrapper]
  54. public AudioReadMode ReadMode
  55. {
  56. get { return Internal_getReadMode(mCachedPtr); }
  57. }
  58. /// <summary>Returns the length of the audio clip, in seconds.</summary>
  59. [ShowInInspector]
  60. [NativeWrapper]
  61. public float Duration
  62. {
  63. get { return Internal_getLength(mCachedPtr); }
  64. }
  65. /// <summary>Returns the total number of samples in the clip (includes all channels).</summary>
  66. [ShowInInspector]
  67. [NativeWrapper]
  68. public uint NumSamples
  69. {
  70. get { return Internal_getNumSamples(mCachedPtr); }
  71. }
  72. /// <summary>Determines will the clip be played a spatial 3D sound, or as a normal sound (for example music).</summary>
  73. [ShowInInspector]
  74. [NativeWrapper]
  75. public bool Is3D
  76. {
  77. get { return Internal_is3D(mCachedPtr); }
  78. }
  79. /// <summary>Returns a reference wrapper for this resource.</summary>
  80. public static implicit operator RRef<AudioClip>(AudioClip x)
  81. { return Internal_GetRef(x.mCachedPtr); }
  82. [MethodImpl(MethodImplOptions.InternalCall)]
  83. private static extern RRef<AudioClip> Internal_GetRef(IntPtr thisPtr);
  84. [MethodImpl(MethodImplOptions.InternalCall)]
  85. private static extern uint Internal_getBitDepth(IntPtr thisPtr);
  86. [MethodImpl(MethodImplOptions.InternalCall)]
  87. private static extern uint Internal_getFrequency(IntPtr thisPtr);
  88. [MethodImpl(MethodImplOptions.InternalCall)]
  89. private static extern uint Internal_getNumChannels(IntPtr thisPtr);
  90. [MethodImpl(MethodImplOptions.InternalCall)]
  91. private static extern AudioFormat Internal_getFormat(IntPtr thisPtr);
  92. [MethodImpl(MethodImplOptions.InternalCall)]
  93. private static extern AudioReadMode Internal_getReadMode(IntPtr thisPtr);
  94. [MethodImpl(MethodImplOptions.InternalCall)]
  95. private static extern float Internal_getLength(IntPtr thisPtr);
  96. [MethodImpl(MethodImplOptions.InternalCall)]
  97. private static extern uint Internal_getNumSamples(IntPtr thisPtr);
  98. [MethodImpl(MethodImplOptions.InternalCall)]
  99. private static extern bool Internal_is3D(IntPtr thisPtr);
  100. }
  101. /** @} */
  102. }