haloo everybody ...
i'm new here - i'm just starting to lern bass because i need to make simulatously download net radio streams
i take netradio example - in statusproc add few lines to save stream to disk - it working fine
if FileStream = nil then
FileStream := TFileStream.Create('UrlRecord.mp3', fmCreate);
if (buffer <> nil) then
FileStream.Write(buffer^, len)
but how to create simultaneously downloading a stream from 2 servers?
i tray many times to do something to create separate object for each stream
eg .i tray to create class like myRec like this:
myRec=class
cthread: DWORD;
chan: HSTREAM;
ThreadId: Cardinal;
constructor create;
function OpenURL(url: PChar): Integer;
end;
for first step in constructor i write:
cthread:=0;
chan:=0;
cthread := BeginThread(nil, 0, @myRec.OpenURL, PChar('
http://listen.radionomy.com/rock-as-u-like-it.m3u'), 0, ThreadId);
but it not working - in openURL on function
chan := BASS_StreamCreateURL(url, 0, BASS_STREAM_STATUS, @StatusProc, nil);
falss whit message:
Exception EOSError in module netradio.exe at 0000d0e9.
System Error. Code 5.
can anybody help me ?
(sory my english - if you dont understand what it means i tray to explain in other words)