SoundPlayer
Controls playback of a sound from a .wav file.
using System.ComponentModel;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Media
{
[NullableContext(2)]
[Nullable(0)]
[ToolboxItem(false)]
public class SoundPlayer : Component, ISerializable
{
public bool IsLoadCompleted {
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
public int LoadTimeout {
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
set {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
[Nullable(1)]
public string SoundLocation {
[NullableContext(1)]
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
[NullableContext(1)]
set {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
public Stream Stream {
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
set {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
public object Tag {
get {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
set {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
public event AsyncCompletedEventHandler LoadCompleted {
add {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
remove {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
public event EventHandler SoundLocationChanged {
add {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
remove {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
public event EventHandler StreamChanged {
add {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
remove {
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
public SoundPlayer()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
public SoundPlayer(Stream stream)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
[NullableContext(1)]
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[EditorBrowsable(EditorBrowsableState.Never)]
protected SoundPlayer(SerializationInfo serializationInfo, StreamingContext context)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
[NullableContext(1)]
public SoundPlayer(string soundLocation)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
public void Load()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
public void LoadAsync()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
[NullableContext(1)]
protected virtual void OnLoadCompleted(AsyncCompletedEventArgs e)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
[NullableContext(1)]
protected virtual void OnSoundLocationChanged(EventArgs e)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
[NullableContext(1)]
protected virtual void OnStreamChanged(EventArgs e)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
public void Play()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
public void PlayLooping()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
public void PlaySync()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
public void Stop()
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions);
}
}
}