public static float SetGroupVolume(AudioChannelGroup group, float value) { float oldVolume = groupVolumes[(int)group]; value = Mathf.Clamp(value, 0, 1); groupVolumes[(int)group] = value; PlatformAudioSystem.SetGroupVolume(group, value); return(oldVolume); }
public static Sound Play(string path, AudioChannelGroup group, bool looping = false, float priority = 0.5f, float fadeinTime = 0f, bool paused = false, float volume = 1f, float pan = 0f, float pitch = 1f) { if (group == AudioChannelGroup.Music && CommandLineArgs.NoMusic) { return(new Sound()); } return(PlatformAudioSystem.Play(new PlayParameters { Path = path, Group = group, Looping = looping, Priority = priority, Paused = paused, Volume = volume, Pan = pan, Pitch = pitch }, fadeinTime)); }
public AudioPlayer() { stream = new MemoryStream(); sound = PlatformAudioSystem.Play(stream, AudioChannelGroup.Music); }
public static void Update() { PlatformAudioSystem.Update(); }
public static void StopGroup(AudioChannelGroup group, float fadeoutTime = 0) { PlatformAudioSystem.StopGroup(group, fadeoutTime); }
public static void StopAll() { PlatformAudioSystem.StopAll(); }
public static void ResumeAll() { PlatformAudioSystem.ResumeAll(); }
public static void PauseAll() { PlatformAudioSystem.PauseAll(); }
public static void ResumeGroup(AudioChannelGroup group) { PlatformAudioSystem.ResumeGroup(group); }
public static void PauseGroup(AudioChannelGroup group) { PlatformAudioSystem.PauseGroup(group); }
public static void Terminate() { PlatformAudioSystem.Terminate(); }
public static void Initialize(ApplicationOptions options) { PlatformAudioSystem.Initialize(options); }
public static Sound Play(PlayParameters parameters, float fadeinTime = 0f) { return(PlatformAudioSystem.Play(parameters, fadeinTime)); }