/// <summary> /// Start or resume playing the <see cref="SoundChannel"/>. /// </summary> /// <param name="channel"><see cref="SoundChannel"/> to play.</param> /// <returns>A playing <see cref="SoundChannel"/>.</returns> public SoundChannel Play(SoundChannel channel) { if (channel.Handle <= 0) { channel.Handle = GenSource(); } else if (channel.Status != SoundStatus.Paused) { channel.Stop(); channel.Handle = GenSource(); channel.Reload(); } channel.Play(); return(Queue(channel)); }
/// <summary> /// Stop playing the <see cref="SoundChannel"/>. /// </summary> /// <param name="channel"><see cref="SoundChannel"/> to stop.</param> public void Stop(SoundChannel channel) { channel.Stop(); }