BASS.NET API for the Un4seen BASS Audio LibraryBassEncBASS_Encode_Write Method (Int32, Single, Int32)BASS.NET API for the Un4seen BASS Audio Library
Sends sample data to the encoder.

This overload uses a managed float[] to handover sample data to the encoder (typically not used, since most encoders expect 16-bit, so use the int[] or short[] overload).

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

[DllImportAttribute("bassenc.dll", CharSet = CharSet.Auto)]
public static bool BASS_Encode_Write(
	int handle,
	float[] buffer,
	int length
)

Parameters

handle
Type: SystemInt32
The encoder or channel handle... a HENCODE, HSTREAM, HMUSIC, or HRECORD.
buffer
Type: SystemSingle
A reference to the first array element (float[0]) containing the sample data.
length
Type: SystemInt32
The number of BYTES in the buffer.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

There's usually no need to use this function, as the channel's sample data will automatically be fed to the encoder. But in some situations, it could be useful to be able to manually feed the encoder instead.

The sample data is expected to be the same format as the channel's, or floating-point if the BASS_CONFIG_FLOATDSP (see BASS_SetConfig(BASSConfig, Int32)) option is enabled.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_ENDEDThe encoder has died.

See Also

Reference