BASS.NET API for the Un4seen BASS Audio LibraryCDDATAPROC DelegateBASS.NET API for the Un4seen BASS Audio Library

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

public delegate void CDDATAPROC(
	int handle,
	int pos,
	IntPtr buffer,
	int length,
	IntPtr user


Type: SystemInt32
The CD stream that provided the data.
Type: SystemInt32
The stream position (in bytes) that the data is from.
Type: Un4seen.Bass.AddOn.CdBASSCDDATAType
The type of data, which can be one of the following (see BASSCDDATAType):

BASS_CD_DATA_SUBCHANNEL : Sub-channel data.

BASS_CD_DATA_C2 : C2 error info.

Type: SystemIntPtr
The pointer to the buffer data.
Type: SystemInt32
The amount of data in bytes.
Type: SystemIntPtr
The user instance data given when BASS_CD_StreamCreateEx(Int32, Int32, BASSFlag, CDDATAPROC, IntPtr) or BASS_CD_StreamCreateFileEx(String, BASSFlag, CDDATAPROC, IntPtr) was called.

Sub-channel data or C2 error info is delivered to this function as soon as it is read from the CD, before the associated audio data is played, or delivered by BASS_ChannelGetData(Int32, IntPtr, Int32) in the case of a decoding channel. The pos value can be used to synchronize the delivered data with the stream's audio data.

CDs are read from in units of a frame, and so this function will always receive a whole number of frames' worth of data; there are 96 bytes of sub-channel data per-frame, and 296 bytes of C2 error info. When BASS_CD_SetOffset(Int32, Int32) has been used to set a read offset, playback may begin mid-frame, and as a result of that, pos may start out negative because the delivered data is from the start of the 1st frame, before where playback will begin from.

Neither sub-channel data or C2 error info will be delivered in the case of a silenced frame resulting from the BASS_CONFIG_CD_SKIPERROR config option being enabled.

See Also