BASS.NET API for the Un4seen BASS Audio Library

BassEncBASS_Encode_Write Method (Int32, Int16, Int32)

BASS.NET API for the Un4seen BASS Audio Library
Sends sample data to the encoder.

This overload uses a managed short[] to handover sample data to the encoder (perfect for 16-bit samples).

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

[DllImportAttribute("bassenc")]
public static bool BASS_Encode_Write(
	int handle,
	short[] buffer,
	int length
)

Parameters

handle
Type: SystemInt32
The encoder or channel handle... a HENCODE, HSTREAM, HMUSIC, or HRECORD.
buffer
Type: SystemInt16
A reference to the first array element (short[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