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: BooleanIf successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
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 CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_ENDED | The encoder has died. |
See Also