public Channel PlaySound(Sound snd, bool paused = false) { IntPtr result = IntPtr.Zero; Errors.ThrowIfError(PlaySound(DangerousGetHandle(), ChannelIndex.Free, snd.DangerousGetHandle(), paused, ref result)); return new Channel(result); }
public Sound CreateStream(string path, SoundMode mode) { IntPtr resultHandle = IntPtr.Zero; Errors.ThrowIfError(CreateStream(DangerousGetHandle(), path, mode, 0, ref resultHandle)); var result = new Sound(resultHandle); _sounds.Add(resultHandle, result); return result; }
public Sound CreateStream(byte[] data, SoundMode mode, SoundInfo exinfo) { IntPtr resultHandle = IntPtr.Zero; Errors.ThrowIfError(CreateStream(DangerousGetHandle(), data, mode, ref exinfo, ref resultHandle)); var result = new Sound(resultHandle); _sounds.Add(resultHandle, result); return result; }
public Sound CreateSound(byte[] data, SoundMode mode = SoundMode.Default) { IntPtr resultHandle = IntPtr.Zero; Errors.ThrowIfError(CreateSound(DangerousGetHandle(), data, mode, 0, ref resultHandle)); var result = new Sound(resultHandle); _sounds.Add(resultHandle, result); return result; }