That looks like you're using an old BASS_FX version that had a BASS_ERROR_FX_NODECODE error code (defined as 4000). More recent BASS_FX versions use the BASS_ERROR_DECODE error code instead. In either case, the issue is that the stream passed to BASS_FX_TempoCreate doesn't have the BASS_STREAM_DECODE flag set on it.