Changeset 665 for trunk/Packages/uos
- Timestamp:
- Jul 9, 2025, 4:45:12 PM (13 hours ago)
- Location:
- trunk/Packages/uos
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/uos
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/Packages/uos/uos.pas
r664 r665 575 575 {$else} 576 576 TProc = procedure of object; 577 TPlayerProc = procedure (PlayerIndex: cint32) of object; 577 578 {$endif} 578 579 … … 762 763 procedure DoTerminatePlayer; 763 764 procedure DoEndProc; 765 procedure EndProcExecute; 764 766 765 767 {$IF DEFINED (mse)} … … 795 797 796 798 // Procedure of object to execute at end of thread 797 EndProc: TP roc;799 EndProc: TPlayerProc; 798 800 799 801 // Procedure to execute at end of thread (not of object) … … 840 842 // Stop playing and free thread 841 843 procedure Stop (); 842 843 // Stop playing and free thread844 procedure StopAndWait ();845 844 846 845 // Pause playing … … 2471 2470 Status := 0; 2472 2471 end; 2473 end;2474 2475 procedure Tuos_Player.StopAndWait();2476 begin2477 Stop;2478 if Assigned(thethread) then thethread.WaitFor;2479 2472 end; 2480 2473 … … 9722 9715 {$IF not DEFINED (Library)} 9723 9716 if EndProc <> nil then 9724 thethread.{$IF DEFINED (usequeue)}Queue{$else}Synchronize{$endif} (thethread, EndProc);9717 thethread.{$IF DEFINED (usequeue)}Queue{$else}Synchronize{$endif} (thethread, @EndProcExecute); 9725 9718 9726 9719 {$elseif not DEFINED (java)} … … 9734 9727 end; 9735 9728 9729 procedure Tuos_Player.EndProcExecute; 9730 begin 9731 EndProc(Index); 9732 end; 9733 9736 9734 procedure Tuos_Player.DoTerminateNoFreePlayer; 9737 9735 var … … 9791 9789 if EndProc <> nil then 9792 9790 {$IF FPC_FULLVERSION>=20701} 9793 thethread.{$IF DEFINED (usequeue)}Queue{$else}Synchronize{$endif} (thethread, EndProc);9791 thethread.{$IF DEFINED (usequeue)}Queue{$else}Synchronize{$endif} (thethread, @EndProcExecute); 9794 9792 {$else} 9795 9793 thethread.{$IF DEFINED (usequeue)}Queue{$else}Synchronize{$endif} (thethread,EndProc); -
trunk/Packages/uos/uos_cdrom.pas
r664 r665 643 643 end; 644 644 645 Function CDROM_Close(var pCDROMI: PCDROMInfo): LongWord;645 Function CDROM_Close(var pCDROMI: PCDROMInfo): Integer; 646 646 Begin 647 647 Result := CDROM_UNKNOWNERR; -
trunk/Packages/uos/uos_flat.pas
r664 r665 197 197 {$else} 198 198 TProc = procedure of object; 199 TPlayerProc = procedure(PlayerIndex: cint32) of object; 199 200 {$endif} 200 201 … … 537 538 // PlayerIndex : Index of an existing Player 538 539 // InIndex : Index of an existing Input 539 procedure uos_EndProc(PlayerIndex: cint32; Proc: TP roc);540 procedure uos_EndProc(PlayerIndex: cint32; Proc: TPlayerProc); 540 541 541 542 // Assign the procedure (not of object) to execute at end, after loop … … 917 918 // Stop playing and free thread 918 919 procedure uos_Stop(PlayerIndex: cint32); 919 920 // Stop playing and free thread921 procedure uos_StopAndWait(PlayerIndex: cint32);922 920 923 921 // Pause playing … … 2299 2297 end; 2300 2298 2301 procedure uos_StopAndWait(PlayerIndex: cint32);2302 begin2303 if (length(uosPlayers) > 0) and (PlayerIndex < length(uosPlayers)) then2304 if uosPlayersStat[PlayerIndex] = 1 then2305 if Assigned(uosPlayers[PlayerIndex]) then2306 uosPlayers[PlayerIndex].StopAndWait()2307 {$IF DEFINED (mse)}2308 {$endif}2309 ;2310 end;2311 2312 2299 procedure uos_Pause(PlayerIndex: cint32);// Pause playing 2313 2300 begin … … 2328 2315 end; 2329 2316 2330 procedure uos_EndProc(PlayerIndex: cint32; Proc: TP roc);2317 procedure uos_EndProc(PlayerIndex: cint32; Proc: TPlayerProc); 2331 2318 // Assign the procedure of object to execute at end, after loop 2332 2319 // PlayerIndex : Index of an existing Player
Note:
See TracChangeset
for help on using the changeset viewer.