SoundPlayer 생성자

정의

SoundPlayer 클래스의 새 인스턴스를 초기화합니다.

오버로드

SoundPlayer()

SoundPlayer 클래스의 새 인스턴스를 초기화합니다.

SoundPlayer(Stream)

SoundPlayer 클래스의 새 인스턴스를 초기화하고 지정된 Stream 내의 .wav 파일을 연결합니다.

SoundPlayer(String)

SoundPlayer 클래스의 새 인스턴스를 초기화하고 지정된 .wav 파일을 연결합니다.

SoundPlayer(SerializationInfo, StreamingContext)
사용되지 않음.

SoundPlayer 클래스의 새 인스턴스를 초기화합니다.

SoundPlayer()

Source:
SoundPlayer.cs
Source:
SoundPlayer.cs
Source:
SoundPlayer.cs

SoundPlayer 클래스의 새 인스턴스를 초기화합니다.

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

설명

이 생성자는 오디오 원본이 없는 을 SoundPlayer 초기화합니다. 오디오 원본 경로 SoundPlayer 로 구성될 때까지 는 재생 방법 중 하나가 호출될 때 경고음 소리를 재생합니다.

추가 정보

적용 대상

SoundPlayer(Stream)

Source:
SoundPlayer.cs
Source:
SoundPlayer.cs
Source:
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 .wav 파일을 포함하는 이어야 합니다Stream. 의 Stream 메서드에서 반환된 Read 데이터는 .wav 파일 내의 데이터여야 합니다.

추가 정보

적용 대상

SoundPlayer(String)

Source:
SoundPlayer.cs
Source:
SoundPlayer.cs
Source:
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)

Source:
SoundPlayer.cs
Source:
SoundPlayer.cs
Source:
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

deserialization에 사용할 SerializationInfo입니다.

context
StreamingContext

deserialization에 사용할 대상입니다.

특성

예외

serializationInfo에 지정된 SoundLocation을 확인할 수 없는 경우

추가 정보

적용 대상