BASS.NET API for the Un4seen BASS Audio LibraryWaveWriter Constructor (String, 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,
	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.
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, SampleRate and BitsPerSample properties according to the given stream stream.

When you have created the stream with the BASS_SAMPLE_FLOAT flag the Wave file will be written in 32-bit float format (WAVE_FORMAT_IEEE_FLOAT). When you have created the stream with the BASS_SAMPLE_8BITS flag 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 signed format (WAVE_FORMAT_PCM).

Note: 24-bit resolutions are not supported with this overload.

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