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

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

public static bool BASS_Encode_Write(
	int handle,
	IntPtr buffer,
	int length


Type: SystemInt32
The encoder or channel handle... a HENCODE, HSTREAM, HMUSIC, or HRECORD.
Type: SystemIntPtr
A pointer to the buffer containing the sample data.
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.

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