The processing granularity of a channel.
BASS_ChannelSetAttribute( DWORD handle, BASS_ATTRIB_GRANULE, float unit );
handle | The channel handle... a HMUSIC, HSTREAM, HRECORD. |
unit | The processing unit size in sample frames... 0 = none. This attribute is an integer (floating-point values will be truncated). |
The amount of data processed in BASS_ChannelGetData calls is not affected, with granularity needing to be enforced in the length parameter then.
When granularity is enabled (non-0), it can change the timing of any DSP/FX changes that are made in mixtime sync callbacks. That is because the DSP/FX processing is done on the entire block of data at the end of the processing cycle then (rather than splitting it at the sync positions), to maintain the specified granularity, resulting in the changes effectively being applied at the start of the processing cycle.
The default value is 0 (none). Changes take immediate effect.
BASS_ChannelSetAttribute(stream, BASS_ATTRIB_GRANULE, 512);