Hi
thanks, it looks like it works! I will test it a little longer.
can you also help me with encoding Progress?
(* Set Cut Position *)
Start_Bytes:= BASS_ChannelSeconds2Bytes(Chan_Source, Start_Pos_MS / 1000); (* get start position in bytes *)
Stop_Bytes:= BASS_ChannelSeconds2Bytes(Chan_Source, Stop_Pos_MS / 1000); (* get end position in bytes *)
Todo_bytes:= Stop_Bytes - Start_Bytes;
BASS_ChannelSetPosition(Chan_Source, Start_Bytes, BASS_POS_BYTE);
if (Start_Bytes > 0) or (Stop_Bytes > 0) then
begin
while (Todo_bytes <> 0) do
begin
BytesRead:= BASS_ChannelGetData(Chan_Mixer, @Buff32, Min(Todo_bytes, SizeOf(Buff32)));
if (BytesRead = -1) or (FAbord) then
Break;
Dec(todo_bytes, BytesRead);
// PercentDone:= ((100 * BASS_ChannelGetPosition(Chan_Source, BASS_POS_BYTE)) div BASS_ChannelGetLength(Chan_Source, BASS_POS_BYTE));
// SendMessage(FWndHandle, WM_RIPPER_UPDATE, WM_RIPPER_PROGRESS, PercentDone); (* [0..100]% *)
end;
end
thx