Recent

Author Topic: Xmplayer Component  (Read 367 times)

Gigatron

  • Sr. Member
  • ****
  • Posts: 282
  • Amiga Rulez !!
Xmplayer Component
« on: May 17, 2025, 08:43:09 pm »
Ok,

Let's continue to simplify the code.

This time to play modules from amiga atari pc i've decided to make a little component
using xmplayer dll, you can find the topic here.

This component is just for making visual fx demo and so, full functions are removed, you
can play , pause stop and resume.

https://forum.lazarus.freepascal.org/index.php/topic,68475.msg529662.html#msg529662

I must thank to Fred Vs for dynamic load library of libxmp.dll

1. First of all for installing this component copy xmplayer to  lazarus/component drawer.
2. Open xmplayerpkg.lpk
3. Compile
4. Install
5. Rebuild Lazarus IDE
6. You will see a new Component like this attached image.
7. After this you can open the project to listen module with minimum code.
8. Don't forget to put libxmp.dll in your project drawer.
Modules and xmplib are atached in zip format second post !

Good luck GTR
« Last Edit: May 18, 2025, 01:51:47 am by Gigatron »
Sub Quantum Technology ! Pascal - C - C# - Java - Javascript - Glsl - Lua - Html5 - CSS - Amiga Rules !

Gigatron

  • Sr. Member
  • ****
  • Posts: 282
  • Amiga Rulez !!
Re: Xmplayer Component
« Reply #1 on: May 17, 2025, 08:44:02 pm »
Modules and libxmp.dll files ;

Modules from : Moby, and ipeck Elite and Amiga freedom force demo.

Example unit1

Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, XMPlayer;
  9.  
  10. type
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.     Label1: TLabel;
  16.     XMPlayer1: TXMPlayer;
  17.     procedure FormCreate(Sender: TObject);
  18.     procedure FormDestroy(Sender: TObject);
  19.   private
  20.  
  21.   public
  22.  
  23.   end;
  24.  
  25. var
  26.   Form1: TForm1;
  27.  
  28. implementation
  29.  
  30. {$R *.lfm}
  31.  
  32. { TForm1 }
  33.  
  34. procedure TForm1.FormCreate(Sender: TObject);
  35. begin
  36.   XMPlayer1.LoadModule('modules/liv2.mod');
  37.   XMPlayer1.Play;
  38. end;
  39.  
  40. procedure TForm1.FormDestroy(Sender: TObject);
  41. begin
  42.   Xmplayer1.Stop;
  43. end;
  44. end.
  45.  
« Last Edit: May 18, 2025, 02:39:56 pm by Gigatron »
Sub Quantum Technology ! Pascal - C - C# - Java - Javascript - Glsl - Lua - Html5 - CSS - Amiga Rules !

 

TinyPortal © 2005-2018