SoundPlayer コンストラクター

定義

SoundPlayer クラスの新しいインスタンスを初期化します。

オーバーロード

SoundPlayer()

SoundPlayer クラスの新しいインスタンスを初期化します。

SoundPlayer(Stream)

SoundPlayer クラスの新しいインスタンスを初期化し、指定した Stream 内で .wav ファイルを結び付けます。

SoundPlayer(String)

SoundPlayer クラスの新しいインスタンスを初期化し、指定した .wav ファイルを結び付けます。

SoundPlayer(SerializationInfo, StreamingContext)
古い.

SoundPlayer クラスの新しいインスタンスを初期化します。

SoundPlayer()

ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs

SoundPlayer クラスの新しいインスタンスを初期化します。

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

注釈

このコンストラクターは、 を SoundPlayer オーディオ ソースなしで初期化します。 オーディオ ソース パスで構成されるまで、 は再生 SoundPlayer 方法の 1 つが呼び出されたときにビープ音を再生します。

こちらもご覧ください

適用対象

SoundPlayer(Stream)

ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs

SoundPlayer クラスの新しいインスタンスを初期化し、指定した Stream 内で .wav ファイルを結び付けます。

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)

パラメーター

stream
Stream

.wav ファイルに結び付ける Stream

注釈

Streamパラメーターにstream渡される は、Stream.wav ファイルを含む である必要があります。 の Stream メソッドによってRead返されるデータは、.wav ファイル内のデータである必要があります。

こちらもご覧ください

適用対象

SoundPlayer(String)

ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs

SoundPlayer クラスの新しいインスタンスを初期化し、指定した .wav ファイルを結び付けます。

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

パラメーター

soundLocation
String

読み込む .wav ファイルの場所。

例外

soundLocation で指定した URL の値が解決できません。

注釈

パラメーターに soundLocation 渡される文字列には、ファイル パスまたは .wav ファイルへの URL を指定できます。 パスまたは URL が無効な SoundPlayer 場合、 は引き続き構築されますが、後続の読み込みメソッドまたは再生メソッドの呼び出しは失敗します。

こちらもご覧ください

適用対象

SoundPlayer(SerializationInfo, StreamingContext)

ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs
ソース:
SoundPlayer.cs

注意事項

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

SoundPlayer クラスの新しいインスタンスを初期化します。

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

パラメーター

serializationInfo
SerializationInfo

逆シリアル化に使用する SerializationInfo

context
StreamingContext

逆シリアル化に使用する転送先。

属性

例外

serializationInfo で指定された SoundLocation が解決できません。

こちらもご覧ください

適用対象