Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help using uFMOD in Delphi!

Featured Replies

Posted

I using uFMOD to Play .xm chiptunes in my Project. It works already finde! When i start the program it plays the music and when i close the program it stop playing. But i like to have one Button where i can start and stop the music. 

Like....

If music is playing then

Stop music else

Play music

...

I'm a newbie in Delphi. I Hope anybody can Help me! 

I will quote Mr kao here

Quote

There is a search button in top right corner. You'll be amazed what you can find when you search for "xm player delphi"

 

  • Author

I know this man. But dont know how i should write the code does it works. Sorry

  • 3 months later...

In my project, I created a global boolean variable called playZik.

var
  playZik: Boolean;


 
In my FormCreate you should have something like the following. Here when the song plays I set my variable TRUE (Playing).

procedure TForm1.FormCreate(Sender: TObject);
begin
	XMPlayFromRes('FOND', 'ZIK');
	playZik := True;
end;

I have a button on my form and enter the following for the OnClick event. This simply checks the flag (our global variable) and if it's TRUE it stops playing the song. If FALSE then it plays, it then just toggles the flag. If True make it False and vice-versa.

procedure TForm1.btnMZKClick(Sender: TObject);
begin
	if playZik then XMStop else XMPlay;
	playZik := not playZik; // toggle flag variable.
end;


Hope this helps. Better late than never lol.

Edited by Croll
code formatting

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.