AudioClip.generated.cs 3.3 KB

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