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