Bewerken

Share via


DataObject.SetAudio Method

Definition

Adds data to the data object in the WaveAudio format.

Overloads

SetAudio(Byte[])

Adds a Byte array to the data object in the WaveAudio format after converting it to a Stream.

SetAudio(Stream)

Adds a Stream to the data object in the WaveAudio format.

SetAudio(Byte[])

Adds a Byte array to the data object in the WaveAudio format after converting it to a Stream.

public:
 virtual void SetAudio(cli::array <System::Byte> ^ audioBytes);
public virtual void SetAudio (byte[] audioBytes);
abstract member SetAudio : byte[] -> unit
override this.SetAudio : byte[] -> unit
Public Overridable Sub SetAudio (audioBytes As Byte())

Parameters

audioBytes
Byte[]

A Byte array containing the audio data.

Exceptions

audioBytes is null.

Remarks

To retrieve audio data from the data object, first use the ContainsAudio method to determine whether the data object contains audio data before retrieving it with the GetAudioStream method.

See also

Applies to

SetAudio(Stream)

Adds a Stream to the data object in the WaveAudio format.

public:
 virtual void SetAudio(System::IO::Stream ^ audioStream);
public virtual void SetAudio (System.IO.Stream audioStream);
abstract member SetAudio : System.IO.Stream -> unit
override this.SetAudio : System.IO.Stream -> unit
Public Overridable Sub SetAudio (audioStream As Stream)

Parameters

audioStream
Stream

A Stream containing the audio data.

Exceptions

audioStream is null.

Remarks

To retrieve audio data from the data object, first use the ContainsAudio method to determine whether the data object contains audio data before retrieving it with the GetAudioStream method.

See also

Applies to