Been struggling for a while with this one. I want to play back a recording from any given point whilst the recording is still ongoing. I have the recording side of things working fine... but I can't succeed with the playback. This is what I have so far.
function PlaybackCallback(Handle: HStream; buffer: Pointer; length: DWord; user: Pointer): DWord; stdcall;
begin
BASS_ChannelGetData(RecordStream, buffer, length);
end;
PlaybackStream := BASS_StreamCreate(SampleFreq, ChannelCount, BASS_SAMPLE_FLOAT {$IFDEF UNICODE} or BASS_UNICODE {$ENDIF}, @PlaybackCallback, nil);
BASS_ChannelSetDevice(PlaybackStream, 1);
BASS_ChannelSetAttribute(PlaybackStream, BASS_ATTRIB_BUFFER, 0);
BASS_ChannelSetPosition(PlaybackStream, BufferClipInPoint, BASS_POS_BYTE);
BASS_ChannelStart(PlaybackStream);
Not getting any errors, but not hearing anything either.
Any help would be greatly appreciated.
Thanks