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[])

Source:
DataObject.cs
Source:
DataObject.cs
Source:
DataObject.cs

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

public virtual void SetAudio (byte[] audioBytes);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

SetAudio(Stream)

Source:
DataObject.cs
Source:
DataObject.cs
Source:
DataObject.cs

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

public virtual void SetAudio (System.IO.Stream audioStream);

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9