Język

SoundPlayer Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy SoundPlayer.

Przeciążenia

Nazwa Opis
SoundPlayer()

Inicjuje nowe wystąpienie klasy SoundPlayer.

SoundPlayer(Stream)

Inicjuje nowe wystąpienie SoundPlayer klasy i dołącza plik .wav w określonym Streamobiekcie .

SoundPlayer(String)

Inicjuje SoundPlayer nowe wystąpienie klasy i dołącza określony plik .wav.

SoundPlayer(SerializationInfo, StreamingContext)
Przestarzałe.

Inicjuje nowe wystąpienie klasy SoundPlayer.

SoundPlayer()

Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs

Inicjuje nowe wystąpienie klasy SoundPlayer.

public:
 SoundPlayer();
public SoundPlayer();
Public Sub New ()

Uwagi

Ten konstruktor inicjuje obiekt SoundPlayer bez źródła audio. Dopóki nie zostanie ona skonfigurowana przy użyciu ścieżki źródłowej dźwięku, będzie odtwarzać dźwięk sygnału dźwiękowego, SoundPlayer gdy zostanie wywołana jedna z metod odtwarzania.

Zobacz też

Dotyczy

SoundPlayer(Stream)

Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs

Inicjuje nowe wystąpienie SoundPlayer klasy i dołącza plik .wav w określonym Streamobiekcie .

public:
 SoundPlayer(System::IO::Stream ^ stream);
public SoundPlayer(System.IO.Stream? stream);
public SoundPlayer(System.IO.Stream stream);
new System.Media.SoundPlayer : System.IO.Stream -> System.Media.SoundPlayer
Public Sub New (stream As Stream)

Parametry

stream
Stream

A Stream do pliku .wav.

Uwagi

Przekazany Stream do parametru stream powinien być plikiem Stream .wav. Dane zwracane przez metodę ReadStream metody powinny być danymi w pliku .wav.

Zobacz też

Dotyczy

SoundPlayer(String)

Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs

Inicjuje SoundPlayer nowe wystąpienie klasy i dołącza określony plik .wav.

public:
 SoundPlayer(System::String ^ soundLocation);
public SoundPlayer(string soundLocation);
new System.Media.SoundPlayer : string -> System.Media.SoundPlayer
Public Sub New (soundLocation As String)

Parametry

soundLocation
String

Lokalizacja pliku .wav do załadowania.

Wyjątki

Nie można rozpoznać wartości adresu URL określonej przez soundLocation program .

Uwagi

Ciąg przekazany do parametru soundLocation może być ścieżką pliku lub adresem URL do pliku .wav. Jeśli ścieżka lub adres URL nie jest prawidłowa, nadal zostanie skonstruowana, SoundPlayer ale kolejne wywołania metody ładowania lub odtwarzania zakończy się niepowodzeniem.

Zobacz też

Dotyczy

SoundPlayer(SerializationInfo, StreamingContext)

Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs
Źródło:
SoundPlayer.cs

Uwaga

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Inicjuje nowe wystąpienie klasy SoundPlayer.

protected:
 SoundPlayer(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext context);
[System.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}")]
protected SoundPlayer(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context);
protected SoundPlayer(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context);
[<System.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}")>]
new System.Media.SoundPlayer : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Media.SoundPlayer
new System.Media.SoundPlayer : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Media.SoundPlayer
Protected Sub New (serializationInfo As SerializationInfo, context As StreamingContext)

Parametry

serializationInfo
SerializationInfo

Element SerializationInfo , który ma być używany do deserializacji.

context
StreamingContext

Miejsce docelowe, które ma być używane do deserializacji.

Atrybuty

Wyjątki

Nie można rozpoznać określonego SoundLocation elementu w serializationInfo .

Zobacz też

Dotyczy