I am having trouble with freeing a stream and re-creating it.
My simplified code:
function start();
begin
Mixer := BASS_Mixer_StreamCreate(44100, 2, BASS_MIXER_NONSTOP or BASS_SAMPLE_FX or BASS_SAMPLE_FLOAT);
if Mixer = 0 then
begin
ShowMessage("Failed to create!");
Exit;
end;
end;
function stop();
begin
BASS_ChannelStop(Mixer);
BASS_StreamFree(Mixer);
end;
If I call start first, it works fine, then I call stop, the mixer stops playing, BUT Mixer still has a handle assigned. If I call start again, it will fail with an unknown error (BASS_ERROR_UNKNOWN).
I have a bit trouble figuring out how to completely free a channel.