Creates a reversed stream from a decoding channel.

HSTREAM BASS_FX_ReverseCreate(
    DWORD chan,
    float dec_block,
    DWORD flags


chanStream/music/wma/cd/any other supported add-on format using a decoding channel
dec_block Length of decoding blocks in seconds. Larger blocks means less seeking overhead but larger spikes
flags A combination of the following flags:
  BASS_SAMPLE_LOOPLooped? Note that only complete sample loops are allowed by DirectSound (ie. you can't loop just part of a sample)
  BASS_SAMPLE_SOFTWAREForce the sample to not use hardware mixing
  BASS_SAMPLE_3DUse 3D functionality. This is ignored if BASS_DEVICE_3D wasn't specified when calling BASS_Init. 3D samples must be mono (use BASS_SAMPLE_MONO)
  requires DirectX 8 or above
Enable the old implementation of DirectX 8 effects. See the DX8 effect implementations section for details. Use BASS_ChannelSetFX to add effects to the stream
  BASS_STREAM_AUTOFREEAutomatically free the stream's resources when it has reached the end, or when BASS_ChannelStop (or BASS_Stop) is called
  BASS_STREAM_DECODEDecode the sample data, without outputting it. Use BASS_ChannelGetData to retrieve decoded sample data. BASS_SAMPLE_SOFTWARE/3D/FX/AUTOFREE are all ignored when using this flag, as are the SPEAKER flags
  BASS_SPEAKER_xxxSpeaker assignment flags
  BASS_FX_FREESOURCEFree the source handle as well

Return value
If successful, the handle of the reversed stream is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.

MODs are supported if BASS_MUSIC_PRESCAN flag was applied to a source handle. Enable reverse supported flags in BASS_FX_ReverseCreate and the others to source handle. For better MP3/2/1 reverse playback create the stream using the BASS_STREAM_PRESCAN flag.

By default stream's position will start from the end with the BASS_FX_RVS_REVERSE direction.

Create a Reverse stream.

HSTREAM chan=BASS_StreamCreateFile(...,BASS_STREAM_DECODE); // create decoded stream
if (chan) chan=BASS_FX_ReverseCreate(chan,2,BASS_FX_FREESOURCE); // create reverse stream, 2 secs decoding block

Error codes

BASS_ERROR_HANDLE chan is not valid
BASS_ERROR_DECODE    The chan is not a decoding channel. Make sure the chan was created using BASS_STREAM_DECODE / BASS_MUSIC_DECODE flag
BASS_ERROR_ILLPARAM An illegal parameter was specified

See also
BASS_FX_ReverseGetSourceReverse Attribute