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.

How to use minifmod in delphi?

Featured Replies

Posted

Hi!

Can anybody help me ? i need to use bassmod.dll or minifmod.dll

i wonder how the code should look like

Edited by nilsen

hi

here is a small example

 [Files]
Source: "C:\BASSMOD.dll"; DestDir: "{tmp}"; Flags: dontcopy
Source: "C:\music.mod"; DestDir: "{tmp}"; Flags: dontcopy[Code]
const
BASS_MUSIC_LOOP = 4;function BASSMOD_Init(device: Integer; freq, flags: DWORD): Boolean;
external 'BASSMOD_Init@files:BASSMOD.dll stdcall delayload';procedure BASSMOD_MusicFree();
external 'BASSMOD_MusicFree@files:BASSMOD.dll stdcall delayload';function BASSMOD_MusicLoad(mem: BOOL; f: PChar; offset: DWORD; length: DWORD; flags: DWORD): Boolean;
external 'BASSMOD_MusicLoad@files:BASSMOD.dll stdcall delayload';function BASSMOD_MusicPlay(): Boolean;
external 'BASSMOD_MusicPlay@files:BASSMOD.dll stdcall delayload';procedure BASSMOD_Free();
external 'BASSMOD_Free@files:BASSMOD.dll stdcall delayload';procedure InitializeWizard();
var
hMod: Integer;
Name1: string;
begin
ExtractTemporaryFile(ExpandConstant('BASSMOD.dll'));
ExtractTemporaryFile(ExpandConstant('music.mod'));
if not BASSMOD_Init(-1,44100,0) then begin
MsgBox('BASSMOD не смогла инициализироваться, проигрывание музыки невозможно.', mbInformation, MB_OK)
BASSMOD_Free;
end;
begin
Name1:=ExpandConstant('{tmp}\music.mod');
BASSMOD_MusicFree;
if BASSMOD_MusicLoad(FALSE, PChar(Name1), 0, 0, BASS_MUSIC_LOOP) then
BASSMOD_MusicPlay;
end;
end;

you can find mor by google with bassmod inno setup or so

ru_example.txt

Edited by ragdog

  • Author

Thank You ragdog it's working fine !

Another question i have.When i use code for minifmod.dll like this:

[Files]Source: "MiniFMOD.dll"; DestDir: "{tmp}"; Flags:dontcopy
Source: "music.XM"; DestDir: "{tmp}"; Flags:dontcopy[Code]const
MB_ICONINFORMATION = $40;
function SongLoadFromFile(FileName: PChar): Integer;
external 'SongLoadFromFile@files:minifmod.dll cdecl delayload';procedure SongPlay(hMod: Integer);
external 'SongPlay@files:minifmod.dll cdecl delayload'; procedure InitializeWizard();
var
hMod: Integer;
Name1: string;begin
ExtractTemporaryFile(ExpandConstant('MiniFMOD.dll'));
ExtractTemporaryFile(ExpandConstant('music.XM'));
Name1:=ExpandConstant('{tmp}\music.XM');
hMod := SongLoadFromFile(PChar(Name1));
SongPlay(hMod);
end;

Problem is when i use this code and cancel installation or finish installation,i've got message error from windows "setup\uninstall error" Zone alarm shows application "MyProgram.tmp". What is wrong?

Just add code to the appropriate handlers to:

1) Stop playing the music.

2) Release the used handles.

3) Delete the temporary files.

Edited by HVC

  • Author
Just add code to the appropriate handlers to:

1) Stop playing the music.

2) Release the used handles.

3) Delete the temporary files.

I don't know how to do it,could You show me how should i modify the code? i'm just learning. Thanks in advanced

@nilsen

hmm you can find all by google

here is a quick example for innosetup fmod

greets

ragdog

inno_fmod.rar

  • Author

I

Edited by nilsen

  • 2 weeks later...
  • Author

When

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.