Delegate CDDataProcedure
User defined CD data callback delegate (to be used with CreateStream(Int32, Int32, BassFlags, CDDataProcedure, IntPtr) or CreateStream(String, BassFlags, CDDataProcedure, IntPtr)).
Namespace: System.Dynamic.ExpandoObject
Assembly: ManagedBass.Cd.dll
Syntax
public delegate void CDDataProcedure(int Handle, int Position, CDDataType Type, IntPtr Buffer, int Length, IntPtr User);
Parameters
Int32
Handle
The CD stream that provided the data. |
Int32
Position
The stream position (in bytes) that the data is from. |
CDDataType
Type
The Type of data. |
IntPtr
Buffer
The pointer to the Buffer data. |
Int32
Length
The amount of data in bytes. |
IntPtr
User
The User instance data given on stream creation. |
Remarks
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
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 SetOffset(Int32, Int32) has been used to set a read offset, playback may begin mid-frame, and as a result of that,
Position
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 SkipError config option being enabled.