BASS_FX_TempoCreate

BASS FX

BASS_FX_TempoCreate

Creates a resampling stream from a decoding channel.

HSTREAM BASS_FX_TempoCreate(
    DWORD chan,
    DWORD flags
);

Parameters

chan Stream/music/wma/cd/any other supported add-on format using a decoding channel
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)
  BASS_SAMPLE_FX
  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 tempo stream handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.

Remarks
Enable Tempo supported flags in BASS_FX_TempoCreate and the others to source handle.

Example
Create a Tempo stream.

HSTREAM chan=BASS_StreamCreateFile(...,BASS_STREAM_DECODE); // create decoded stream
if (chan) chan=BASS_FX_TempoCreate(chan,BASS_FX_FREESOURCE); // create a tempo stream

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

See also
BASS_FX_TempoGetSourceBASS_FX_TempoGetRateRatio, Tempo Attributes