I would use BASS_StreamCreate rather than BASS_SampleCreate. For example, something like this:
float sinstep, sinpos, sinlevel;
DWORD sinremain;
DWORD CALLBACK SinStreamProc(HSTREAM handle, void *buffer, DWORD length, void *user)
{
float *fbuf = (float*)buffer;
if (length > sinremain) length = sinremain;
for (DWORD a = 0; a < length / sizeof(float); a++) {
fbuf[a] = sinlevel * sin(sinpos);
sinpos += sinstep;
}
sinremain -= length;
if (!sinremain) return length | BASS_STREAMPROC_END;
return length;
}
...
sinstream = BASS_StreamCreate(44100, 1, BASS_SAMPLE_FLOAT, SinStreamProc, 0);
sinstep = 2 * M_PI * sinfreq / 44100;
sinpos = 0;
sinlevel = pow10(sindb / 20);
sinremain = BASS_ChannelSeconds2Bytes(stream, sintime);
BASS_ChannelPlay(sinstream, false);
Set sinfreq (frequency), sindb (dB level) and sintime (length in seconds) as wanted.