using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace BansheeEngine { /** @addtogroup Audio * @{ */ /// Provides global functionality relating to sounds and music. public partial class Audio : ScriptObject { private Audio(bool __dummy0) { } protected Audio() { } /// Determines global audio volume. In range [0, 1]. public static float Volume { get { return Internal_getVolume(); } set { Internal_setVolume(value); } } /// Determines if audio reproduction is paused globally. public static bool Paused { get { return Internal_isPaused(); } set { Internal_setPaused(value); } } /// Determines the device on which is the audio played back on. public static AudioDevice ActiveDevice { get { AudioDevice temp; Internal_getActiveDevice(out temp); return temp; } set { Internal_setActiveDevice(ref value); } } /// Returns the default audio device identifier. public static AudioDevice DefaultDevice { get { AudioDevice temp; Internal_getDefaultDevice(out temp); return temp; } } /// Returns a list of all available audio devices. public static AudioDevice[] AllDevices { get { return Internal_getAllDevices(); } } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setVolume(float volume); [MethodImpl(MethodImplOptions.InternalCall)] private static extern float Internal_getVolume(); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setPaused(bool paused); [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool Internal_isPaused(); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setActiveDevice(ref AudioDevice device); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_getActiveDevice(out AudioDevice __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_getDefaultDevice(out AudioDevice __output); [MethodImpl(MethodImplOptions.InternalCall)] private static extern AudioDevice[] Internal_getAllDevices(); } /** @} */ }