SoundPlayer Constructores
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Inicializa una nueva instancia de la clase SoundPlayer.
Sobrecargas
| Nombre | Description |
|---|---|
| SoundPlayer() |
Inicializa una nueva instancia de la clase SoundPlayer. |
| SoundPlayer(Stream) |
Inicializa una nueva instancia de la SoundPlayer clase y adjunta el archivo .wav dentro del especificado Stream. |
| SoundPlayer(String) |
Inicializa una nueva instancia de la SoundPlayer clase y adjunta el archivo .wav especificado. |
| SoundPlayer(SerializationInfo, StreamingContext) |
Obsoletos.
Inicializa una nueva instancia de la clase SoundPlayer. |
SoundPlayer()
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
Inicializa una nueva instancia de la clase SoundPlayer.
public:
SoundPlayer();
public SoundPlayer();
Public Sub New ()
Comentarios
Este constructor inicializa un SoundPlayer sin origen de audio. Hasta que se configure con una ruta de acceso de origen de audio, reproducirá SoundPlayer un sonido de sonido de sonido cuando se llame a uno de sus métodos de reproducción.
Consulte también
Se aplica a
SoundPlayer(Stream)
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
Inicializa una nueva instancia de la SoundPlayer clase y adjunta el archivo .wav dentro del especificado Stream.
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)
Parámetros
Comentarios
El Stream objeto pasado al stream parámetro debe ser un Stream objeto que contiene un archivo .wav. Los datos devueltos por el Read método de Stream deben ser los datos de un archivo .wav.
Consulte también
Se aplica a
SoundPlayer(String)
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
Inicializa una nueva instancia de la SoundPlayer clase y adjunta el archivo .wav especificado.
public:
SoundPlayer(System::String ^ soundLocation);
public SoundPlayer(string soundLocation);
new System.Media.SoundPlayer : string -> System.Media.SoundPlayer
Public Sub New (soundLocation As String)
Parámetros
- soundLocation
- String
Ubicación de un archivo .wav que se va a cargar.
Excepciones
No se puede resolver el valor de dirección URL especificado por soundLocation .
Comentarios
La cadena pasada al soundLocation parámetro puede ser una ruta de acceso de archivo o una dirección URL a un archivo .wav. Si la ruta de acceso o la dirección URL no son válidas, SoundPlayer se seguirá construyendo, pero se producirán errores en las llamadas posteriores a un método de carga o reproducción.
Consulte también
Se aplica a
SoundPlayer(SerializationInfo, StreamingContext)
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
- Source:
- SoundPlayer.cs
Precaución
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Inicializa una nueva instancia de la clase 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)
Parámetros
- serializationInfo
- SerializationInfo
SerializationInfo que se va a usar para la deserialización.
- context
- StreamingContext
Destino que se va a usar para la deserialización.
- Atributos
Excepciones
No SoundLocation se puede resolver el especificado en serializationInfo .