BASS_Encode_AddChunk
Sends a RIFF chunk to an encoder.
BOOL BASS_Encode_AddChunk( DWORD handle, char *id, void *buffer, DWORD length );
Parameters
handle | The encoder handle... a HENCODE. | id | The 4 character chunk id. | buffer | The buffer containing the chunk data. | length | The number of bytes in the buffer. |
Return value
If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.Error codes
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. |
Remarks
BASSenc writes the minimum chunks required of a WAV file: "fmt" and "data", and "ds64" and "fact" when appropriate. This function can be used to add other chunks. For example, a BWF "bext" chunk or "INFO" tags.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.