Click or drag to resize
Accord.NET (logo)

ExtensionsToSampleFormat Method

Converts a WaveFormatEncoding and bits per sample information into an appropriate SampleFormat.

Namespace:  Accord.Audio
Assembly:  Accord.Audio.DirectSound (in Accord.Audio.DirectSound.dll) Version: 3.8.0
Syntax
public static SampleFormat ToSampleFormat(
	this WaveFormatEncoding tag,
	int bitsPerSample
)
Request Example View Source

Parameters

tag
Type: WaveFormatEncoding
The wave format tag.
bitsPerSample
Type: SystemInt32
The bits per sample.

Return Value

Type: SampleFormat

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type WaveFormatEncoding. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also