yes, definitely is the "Result: = -1" to be changed in "Result: = 0" (for linux) but at this point it is better the earlier version.
I do not know if there is a case where offset is actually greater than 0.
Why so it also works:
function mpg_seek_url (aHandle: Pointer; Offset: Integer;
whence: Integer): Integer; cdecl;
Result: = 0;
As for "soFromEnd" it is impossible because you do not know the term.
In the current version there is "soFromCurrent".
But in theory according to the documentation:
http://www.freepascal.org/docs-html/fcl/pipes/tinputpipestream.seek.html Also "soFromBeginning" is supportable (but I do not know what could serve).
I wanted to see if you could but some benefit but I have no ideas.
changing the topic..
2) load a file or stream
3) for some reason the user does not press the button to play
I just sent you an email with all the source to see the problem
NOTE1: if you run "project1.exe" does not appear, but running on Lazarus yes
NOTE2: if you comment this code no crash
if output = -1 then
Hello, I saw your email and in theory it should go but I do not know why on my computer is not working properly. I created an external test just to rule out other possible causes like my bug.
Probably there is something outside of uos.
Even I used FPC 3.0.2 32bit.
When I find the reason I'll let you know.
I tried everything
Uninstallation, 32 / 64bit, debugger,..
(I also tried it on a Win Vista 32-bit computer)
In linux it works, but in Windows ...
I eventually found a compromise
I tried to find an alternative solution for the memory leak that depended on the lack call of Thread.Start (= no destroy).
If you find interesting:
in class TuosPlayer add var "isExecute: Boolean;"
in Tuos_Player.Create add "isExecute:= False;"
in Tuos_Player.Execute add for first:
if isExecute then
Exit //not can call execute again
(B) modified method
if (isAssigned = True) then
if isExecute then
//if the thread has not been started..
//..force the immediate termination to destroy
I tested different combinations and it seems to work (no crash, no memory leak).
As an added also solves my problem (mystery crash) with the "play () stop () (Tuos_Player.FreePlayer())" consecutive.
> Did you try the exe that I sent you by mail ?
> If yes, do you have problem too with it ?
it works perfectly, Thanks (also my compiled works, but crash if you run it through lazarus: so I do not feel safe)