AudioClip.generated.cs 3.1 KB

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