Hello Fred
First of all thank you very much for your great library!
I just want to let you know I have a small issue when playing spotify preview urls.
For example this url:
https://p.scdn.co/mp3-preview/ad672a346d38cdcdb7ea6c246282d43522473968?cid=nullIn Debug mode function mpg_seek_stream generates a runtime error.
aoffset has sometimes a negative value, for example -128. Probably this is due the fact it's a 30 seconds preview of the full song.
When I changed the mpg_seek_stream code like this I am able to play the previews. More or less "fixed my problem"
function mpg_seek_stream(ahandle: Pointer; aoffset: Integer): Integer;
var
Stream: TStream absolute ahandle;
begin
// pipe streams are not seekable but memory and filestreams are
Result := aoffset;
try
if aoffset > 0 then //instead of aoffset <> 0
Result := Stream.Seek(soFromCurrent, aoffset);
except
Result := 0;
end;
end;
Maybe you have a better solution or am I doing something wrong here....
Just to let you know and keep up the good work!
KB