using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace BansheeEngine { /** @addtogroup Audio * @{ */ /// /// Audio clip stores audio data in a compressed or uncompressed format. Clips can be provided to audio sources or other /// audio methods to be played. /// public partial class AudioClip : Resource { private AudioClip(bool __dummy0) { } protected AudioClip() { } /// Returns the size of a single sample, in bits. public uint BitDepth { get { return Internal_getBitDepth(mCachedPtr); } } /// Returns how many samples per second is the audio encoded in. public uint SampleRate { get { return Internal_getFrequency(mCachedPtr); } } /// Returns the number of channels provided by the clip. public uint NumChannels { get { return Internal_getNumChannels(mCachedPtr); } } /// Returns in which format is audio data stored in. public AudioFormat Format { get { return Internal_getFormat(mCachedPtr); } } /// Returns how is the audio data read/decoded. public AudioReadMode ReadMode { get { return Internal_getReadMode(mCachedPtr); } } /// Returns the length of the audio clip, in seconds. public float Duration { get { return Internal_getLength(mCachedPtr); } } /// Returns the total number of samples in the clip (includes all channels). public uint NumSamples { get { return Internal_getNumSamples(mCachedPtr); } } /// Determines will the clip be played a spatial 3D sound, or as a normal sound (for example music). public bool Is3D { get { return Internal_is3D(mCachedPtr); } } [MethodImpl(MethodImplOptions.InternalCall)] private static extern uint Internal_getBitDepth(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern uint Internal_getFrequency(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern uint Internal_getNumChannels(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern AudioFormat Internal_getFormat(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern AudioReadMode Internal_getReadMode(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern float Internal_getLength(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern uint Internal_getNumSamples(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool Internal_is3D(IntPtr thisPtr); } /** @} */ }