Ignore:
Timestamp:
Jul 9, 2025, 4:45:12 PM (13 hours ago)
Author:
chronos
Message:
  • Fixed: Playing music on Windows.
Location:
trunk/Packages/uos
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/uos

    • Property svn:ignore set to
      lib
  • trunk/Packages/uos/uos.pas

    r664 r665  
    575575  {$else}
    576576  TProc = procedure  of object;
     577  TPlayerProc = procedure (PlayerIndex: cint32)  of object;
    577578  {$endif}
    578579
     
    762763      procedure DoTerminatePlayer;
    763764      procedure DoEndProc;
     765      procedure EndProcExecute;
    764766
    765767  {$IF DEFINED (mse)}
     
    795797
    796798      // Procedure of object to execute at end of thread
    797       EndProc: TProc;
     799      EndProc: TPlayerProc;
    798800
    799801      // Procedure to execute at end of thread (not of object)
     
    840842      // Stop playing and free thread
    841843      procedure Stop ();
    842 
    843       // Stop playing and free thread
    844       procedure StopAndWait ();
    845844
    846845      // Pause playing
     
    24712470      Status := 0;
    24722471    end;
    2473 end;
    2474 
    2475 procedure Tuos_Player.StopAndWait();
    2476 begin
    2477   Stop;
    2478   if Assigned(thethread) then thethread.WaitFor;
    24792472end;
    24802473
     
    97229715 {$IF not DEFINED (Library)}
    97239716  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);
    97259718 
    97269719  {$elseif not DEFINED (java)}
     
    97349727end;
    97359728
     9729procedure Tuos_Player.EndProcExecute;
     9730begin
     9731  EndProc(Index);
     9732end;
     9733
    97369734procedure Tuos_Player.DoTerminateNoFreePlayer;
    97379735var
     
    97919789  if EndProc <> nil then
    97929790  {$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);
    97949792  {$else}
    97959793  thethread.{$IF DEFINED (usequeue)}Queue{$else}Synchronize{$endif} (thethread,EndProc);
Note: See TracChangeset for help on using the changeset viewer.