Hello,
I'm new to BASS and I want to make a 4 channel stream with custom samples (sine waves) in an automatic loop.
I've tried using BASS_ChannelFlags(stream, BASS_SAMPLE_LOOP, BASS_SAMPLE_LOOP) but this doesn't set the BASS_SAMPLE_LOOP flag.
Code (VB6.0):
BASS_Init(-1, 24000, 0, FrmMain.Hwnd, 0)
stream = BASS_StreamCreate(24000, 4, 0, STREAMPROC_PUSH, 0)
'code to generate all samples stored in WaveData() array goes here
BASS_ChannelFlags(stream, BASS_SAMPLE_LOOP, BASS_SAMPLE_LOOP) 'DOES NOT WORK (returns 0x20) BASS_SAMPLE_LOOP is not set ???
BASS_StreamPutData(stream, WaveData(0), DataLength)
BASS_StreamPutData(stream, Null, BASS_STREAMPROC_END)
sync_end = BASS_ChannelSetSync(stream, BASS_SYNC_END, 0, AddressOf SyncEndTest, 0) 'works
sync = BASS_ChannelSetSync(stream, BASS_SYNC_POS, 24000 * 4 * 2, AddressOf SyncTest, 0) 'DOES NOT WORK SyncTest is not called after 1 sec. (does not return 0 in the sync variable ???).
BASS_ChannelPlay(stream, BASSFALSE) 'plays the sound only once
Does anyone know how to make it play in a loop?
Also like to receive updates of the current sample that is played (every +/-100ms) using the BASS_ChannelSetSync().