BASS.NET API for the Un4seen BASS Audio LibraryWaveWriter Constructor (String, Int32, Int32, Boolean)BASS.NET API for the Un4seen BASS Audio Library
Create a WaveWrite instance from a given BASS stream channel.

Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public WaveWriter(
	string fileName,
	int stream,
	int bitsPerSample,
	bool rewrite
)

Parameters

fileName
Type: SystemString
Fully referenced path and file name of the Wave file to create.
stream
Type: SystemInt32
A BASS stream channel (HMUSIC, HSTREAM, HRECORD) for which to create a WaveWriter.
bitsPerSample
Type: SystemInt32
Bits per sample of the wave file (must be either 8, 16, 24 or 32). This overrides the actual stream resolution and the bit rate will be converted automatically (however quality might be effected but never increased).
rewrite
Type: SystemBoolean
Specifies, if an existing fileName should be overwritten (=overwrite, =do not overwrite).
Exceptions

ExceptionCondition
ArgumentExceptionThe channel information could not be retrieved for the stream.
IOExceptionThe file already exists (only raised if the rewrite has not been used). Or the Wave Header could not be written.
Remarks

The sample data provided when calling the Write(IntPtr, Int32) method must conform the stream info settings. No resampling will be applied here.

This overload already sets the NumChannels and SampleRate properties according to the given stream stream. The BitsPerSample will be overwritten.

When you have specified a 32-bit resolution the Wave file will be written in 32-bit float format (WAVE_FORMAT_IEEE_FLOAT). When you have specified an 8-bit resolution the Wave file will be written in 8-bit unsigned format (WAVE_FORMAT_PCM). In all other cases the the Wave file will be written in 16-bit or 24-bit signed format (WAVE_FORMAT_PCM).

If the stream contains more than 2 channels (e.g. multi-channel) the Wave file will be written in the WAVE_FORMAT_EXTENSIBLE format.

See Also

Reference