Sends a RIFF chunk to an encoder.
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_AddChunk( int handle, string id, byte[] buffer, int length )
Parameters
- handle
- Type: SystemInt32
The encoder handle... a HENCODE. - id
- Type: SystemString
The 4 character chunk id (e.g. 'bext'). - buffer
- Type: SystemByte
The buffer containing the chunk data (without the id). - 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
Chunks can only be added prior to sample data being sent to the encoder. The BASS_ENCODE_PAUSE flag can be used when starting the encoder to ensure that no sample data is sent before additional chunks have been set.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTAVAIL | No RIFF headers/chunks are being sent to the encoder (due to the BASS_ENCODE_NOHEAD flag being in effect), or sample data encoding has started. |
BASS_ERROR_ENDED | The encoder has died. |
Examples
C#
BASS_TAG_BEXT bext = new BASS_TAG_BEXT(); ... set the bext member here string codingHistory = "..."; byte[] bextData = bext.AsByteArray(codingHistory); bool ok = BassEnc.BASS_Encode_AddChunk(handle, "bext", bextData, bextData.Length);
See Also