Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2020, 16:54
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,393 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Talking xbass.dll - Music plugin

XBass - Music plugin

Code:
TYPE 01:

type
  TXBassCallback = procedure(Const FPct: Integer; Const FDuration, FPosition, FCurMusicFile: WideString);

type
  IXBass = Interface(IUnknown)
    '{3A515F05-FBAE-4D1E-80A0-808E6FAF3187}'
    function FCreate(AHandle: HWND; AFilename: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean;
    function FCreateList(AHandle: HWND; AFolder: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean;
    procedure Play;
    procedure Stop;
    procedure Pause;
    procedure Resume;
    function IsPaused: Boolean;
    procedure Next;
    procedure Prev;
    function ChangeDir(const AFolder: WideString): Boolean;
    function ChangeFile(const AFilename: WideString): Boolean;
    function GetPosition: WideString;
    function GetDuration: WideString;
    function GetPct: Integer;
    function GetCurFile: WideString;
    function GetVolume: Integer;
    procedure SetVolume(Const Vol: Integer);
    procedure SeekForward(Const Sec: Integer);
    procedure SeekBackward(Const Sec: Integer);
    procedure DoFree;
  End;

function InitXBass: IXBass;
  external 'InitXBass@files:xbass_f.dll stdcall';
function DeInitXBass: Boolean;
  external 'DeInitXBass@files:xbass_f.dll stdcall';

Code:
TYPE 02:

type
  TXBassCallback = procedure(Const FPct: Integer; Const FDuration, FPosition, FCurMusicFile: WideString);

function xbassCreate(AHandle: HWND; AFilename: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean; 
function xbassCreateList(AHandle: HWND; AFolder: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean;  

procedure xbassPlay; 
procedure xbassStop;                                          
procedure xbassPause;                                             
procedure xbassResume;                                            
function xbaseeIsPaused: Boolean;                                
procedure xbassNext;                                            
procedure xbassPrev;                                             
function xbassChangeDir(const AFolder: WideString): Boolean;      
function xbassChangeFile(const AFilename: WideString): Boolean;   
function xbassGetPosition: WideString;                            
function xbassGetDuration: WideString;                            
function xbassGetPct: Integer;                                    
function xbassGetCurFile: WideString;                             
function xbassGetVolume: Integer;                                 
procedure xbassSetVolume(Const Vol: Integer);                     
procedure xbassSeekForward(Const Sec: Integer);                   
procedure xbassSeekBackward(Const Sec: Integer);                  
procedure xbassFree;
Attached Images
File Type: png 0.png (18.7 KB, 234 views)
Attached Files
File Type: 7z XBass v4.1.0.0.f + Example.7z (1.91 MB, 48 views)

Last edited by BLACKFIRE69; 09-03-2023 at 04:00.
Reply With Quote
The Following 10 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (09-10-2020), Balaji007 (03-10-2020), Cuttlas (03-10-2020), dixen (04-10-2020), ffmla (22-10-2020), Gehrman (09-03-2023), Harsh ojha (04-10-2020), hitman797 (10-03-2023), kenzo34 (04-10-2020), ZAZA4EVER (04-10-2020)
Sponsored Links
  #2  
Old 04-10-2020, 05:08
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,393 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Arrow xbass - New Update

xbass - New Update


What's New:
  • Some improvements.
  • Added new example.



_
Attached Images
File Type: png 4.png (17.6 KB, 467 views)
File Type: png 3.png (9.0 KB, 469 views)

Last edited by BLACKFIRE69; 15-10-2022 at 17:23.
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
Balaji007 (17-10-2020), dixen (04-10-2020), ZAZA4EVER (04-10-2020)
  #3  
Old 22-10-2020, 05:59
Balaji007's Avatar
Balaji007 Balaji007 is offline
Registered User
 
Join Date: Nov 2019
Location: Internet 😝
Posts: 34
Thanks: 41
Thanked 6 Times in 6 Posts
Balaji007 is on a distinguished road
Question

Hi friend
It is a simple doubt. I am trying with your example script. But it was played the song one time only. How repeat the song? Any solutions are available
__________________
If you will smile,You will live long
Just like the haters,they are helping to improve your skills.
Reply With Quote
  #4  
Old 20-01-2021, 07:23
Ele's Avatar
Ele Ele is offline
Registered User
 
Join Date: Nov 2020
Location: Near Mars
Posts: 93
Thanks: 76
Thanked 92 Times in 37 Posts
Ele is on a distinguished road
Lightbulb xbass.dll v2.0

Quote:
Originally Posted by Balaji007 View Post
Hi friend
It is a simple doubt. I am trying with your example script. But it was played the song one time only. How repeat the song? Any solutions are available
It could be. So try the new version (v.2.0) of the xbass.dll. That's all you need.

(xbass.dll v2.0 requires "inno setup enhanced edition")


xbass.dll v2.0
Quote:
function MusicOpenFile(handle: hwnd; title: widestring; defaultPath: widestring): widestring; external 'MusicOpenFile@files:xbass.dll stdcall';

procedure InitMusic(filename: widestring; RepeatOn: boolean); external 'InitMusic@files:xbass.dll stdcall';
procedure PlayMusic; external 'PlayMusic@files:xbass.dll stdcall';
procedure PauseMusic; external 'PauseMusic@files:xbass.dll stdcall';
procedure ResumeMusic; external 'ResumeMusic@files:xbass.dll stdcall';
procedure StopMusic; external 'StopMusic@files:xbass.dll stdcall';
procedure SetVolume(vol: integer); external 'SetVolume@files:xbass.dll stdcall';
function MusicPct: integer; external 'MusicPct@files:xbass.dll stdcall';
function MusicPosition: widestring; external 'MusicPosition@files:xbass.dll stdcall';
function MusicDuration: widestring; external 'MusicDuration@files:xbass.dll stdcall';
procedure DeInitMusic; external 'DeInitMusic@files:xbass.dll stdcall';

information:
Attached Images
File Type: png Screenshot 2021-01-20 192936.png (14.8 KB, 361 views)
Attached Files
File Type: zip xbass v2.0.0.0 + Example.zip (256.4 KB, 38 views)
__________________
- All life is an experiment. The more experiments you make the better. -

Last edited by Ele; 20-01-2021 at 07:26.
Reply With Quote
The Following 2 Users Say Thank You to Ele For This Useful Post:
Cesar82 (20-01-2021), ffmla (20-01-2021)
  #5  
Old 22-01-2021, 12:16
Ele's Avatar
Ele Ele is offline
Registered User
 
Join Date: Nov 2020
Location: Near Mars
Posts: 93
Thanks: 76
Thanked 92 Times in 37 Posts
Ele is on a distinguished road
Lightbulb xbass.dll v3.0

xbass.dll v3.0

Features:
Quote:
  • Audio plugins updated.
  • Supports "*.mp3, *.ogg, *.wav".
  • Supports seek forward and seek backward.
  • Added in built-in timer.
  • Tested in Inno setup 6.x.x Unicode.

Quote:
function MusicOpenFile(handle: HWND; defaultPath: widestring): widestring;
function XSetTimer(handle: HWND; Interval: longword; lpTimerFunc: longword): Cardinal;
function XKillTimer(handle: HWND; TimerId: Cardinal): boolean;
function XWrap(Callback: TTimerProc; Paramcount: integer): longword;

procedure InitMusic(handle: HWND; filename: widestring; volume: integer; RepeatOn: boolean);
procedure MusicPlay;
procedure MusicPause;
procedure MusicResume;
procedure MusicStop;
procedure MusicSetVolume(vol: integer);
function MusicPct: integer;
function MusicPosition: widestring;
function MusicDuration: widestring;
procedure MusicForward(sec: integer);
procedure MusicBackward(sec: integer);
procedure DeInitMusic;

Details:
Attached Images
File Type: png Screenshot 2021-01-23 001957.png (9.8 KB, 328 views)
Attached Files
File Type: zip xbass v3.0.0.0 + Example.zip (282.3 KB, 40 views)
__________________
- All life is an experiment. The more experiments you make the better. -
Reply With Quote
The Following 4 Users Say Thank You to Ele For This Useful Post:
Black_Angel_Kjh (11-07-2021), dixen (26-01-2021), ffmla (23-01-2021), Harsh ojha (23-01-2021)
  #6  
Old 09-03-2023, 04:02
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,393 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Arrow XBass - Update

XBass Update Available!


Code:
TYPE 01:

type
  TXBassCallback = procedure(Const FPct: Integer; Const FDuration, FPosition, FCurMusicFile: WideString);

type
  IXBass = Interface(IUnknown)
    '{3A515F05-FBAE-4D1E-80A0-808E6FAF3187}'
    function FCreate(AHandle: HWND; AFilename: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean;
    function FCreateList(AHandle: HWND; AFolder: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean;
    procedure Play;
    procedure Stop;
    procedure Pause;
    procedure Resume;
    function IsPaused: Boolean;
    procedure Next;
    procedure Prev;
    function ChangeDir(const AFolder: WideString): Boolean;
    function ChangeFile(const AFilename: WideString): Boolean;
    function GetPosition: WideString;
    function GetDuration: WideString;
    function GetPct: Integer;
    function GetCurFile: WideString;
    function GetVolume: Integer;
    procedure SetVolume(Const Vol: Integer);
    procedure SeekForward(Const Sec: Integer);
    procedure SeekBackward(Const Sec: Integer);
    procedure DoFree;
  End;

function InitXBass: IXBass;
  external 'InitXBass@files:xbass_f.dll stdcall';
function DeInitXBass: Boolean;
  external 'DeInitXBass@files:xbass_f.dll stdcall';

Code:
TYPE 02:

type
  TXBassCallback = procedure(Const FPct: Integer; Const FDuration, FPosition, FCurMusicFile: WideString);

function xbassCreate(AHandle: HWND; AFilename: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean; 
function xbassCreateList(AHandle: HWND; AFolder: WideString; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback): Boolean;  

procedure xbassPlay; 
procedure xbassStop;                                          
procedure xbassPause;                                             
procedure xbassResume;                                            
function xbaseeIsPaused: Boolean;                                
procedure xbassNext;                                            
procedure xbassPrev;                                             
function xbassChangeDir(const AFolder: WideString): Boolean;      
function xbassChangeFile(const AFilename: WideString): Boolean;   
function xbassGetPosition: WideString;                            
function xbassGetDuration: WideString;                            
function xbassGetPct: Integer;                                    
function xbassGetCurFile: WideString;                             
function xbassGetVolume: Integer;                                 
procedure xbassSetVolume(Const Vol: Integer);                     
procedure xbassSeekForward(Const Sec: Integer);                   
procedure xbassSeekBackward(Const Sec: Integer);                  
procedure xbassFree;
Attached Images
File Type: png 0.png (18.7 KB, 240 views)
Attached Files
File Type: 7z XBass v4.1.0.0.f + Example.7z (1.91 MB, 18 views)
Reply With Quote
  #7  
Old 03-07-2024, 15:09
Fak Eid Fak Eid is offline
Registered User
 
Join Date: Jun 2023
Location: Mars
Posts: 144
Thanks: 89
Thanked 136 Times in 53 Posts
Fak Eid is on a distinguished road
Can someone share me an example as how to use .ogg files in IXBass which was supported after xBass.dll v3.0?
Reply With Quote
  #8  
Old 14-07-2024, 08:19
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,393 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Arrow XBass_f v4.1

Quote:
Can someone share me an example as how to use .ogg files in IXBass which was supported after xBass.dll v3.0?

it's nothing but you need to have decoders next to the 'XBass.dll'. In this case, they are 'ogg.dll' and 'vorbis*.dll'.



* What's new with this release:

1. Compiled in Delphi XE to reduce the file size.
- FileSize: 4.51 MB --> 497 KB (Saved: 90%)

2. Play through memory.
- Since this build, you can play files through memory, instead of having them on the hard drive.
- However, you need to use 'InnoSetup Enhanced Edition' or 'FXStream' to utilize this feature.

Code:
function xbassCreateFromMem(AHandle: HWND; const Buffer: PAnsiChar; const Count, BassType: Cardinal; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback1): Boolean;

function xbassChangeMem(const Buffer: PAnsiChar; const Count: Cardinal): Boolean;

--------------------------------

type
  IXBass = Interface(IUnknown)
    '{3A515F05-FBAE-4D1E-80A0-808E6FAF3187}'
    ...
    function FCreateFromMem(AHandle: HWND; const Buffer: PAnsiChar; const Count, BassType: Cardinal; ASpeed: Single; RepeatOn: Boolean; ACallback: TXBassCallback1): Boolean;
    function ChangeMem(const Buffer: PAnsiChar; const Count: Cardinal): Boolean;
	...
 end;

* InnoSetup Enhanced Edition:

Code:
procedure InitializeWizard();
var
  Buffer: AnsiString;
  Count: Cardinal;
begin
  //
  Count := ExtractTemporaryFileSize('{#MusicFileOnly}');
  SetLength(Buffer, Count);
  ExtractTemporaryFileToBuffer('{#MusicFileOnly}', CastAnsiStringToInteger(Buffer));
  //

  ExtractTemporaryFile('ogg.dll');
  ExtractTemporaryFile('vorbis.dll');
  ExtractTemporaryFile('vorbisenc.dll');
  ExtractTemporaryFile('vorbisfile.dll');

  CreateOrChange;
  PlayNextBtn.Enabled := False;
  PlayPrevBtn.Enabled := False;

  if not xbassCreateFromMem(WizardForm.Handle,
                            Buffer,
                            Count,
                            C_XBASS_OGG,
                            1, True, @MusicCallback) then
    MsgBox('XBass - error(s) occured while creating.', mbError, MB_OK);
end;

* FXStream:

Code:
procedure InitializeWizard();
var
  Buffer: AnsiString;
  Count: Cardinal;
begin
  //
  Count := FXUnPckrExtractFileSize('{#MusicFileOnly}');
  SetLength(Buffer, Count);
  FXUnPckrExtractToBuffer2A('{#MusicFileOnly}', Buffer, Count);
  //

  ExtractTemporaryFile('ogg.dll');
  ExtractTemporaryFile('vorbis.dll');
  ExtractTemporaryFile('vorbisenc.dll');
  ExtractTemporaryFile('vorbisfile.dll');

  CreateOrChange;
  PlayNextBtn.Enabled := False;
  PlayPrevBtn.Enabled := False;

  if not xbassCreateFromMem(WizardForm.Handle,
                            Buffer,
                            Count,
                            C_XBASS_OGG,
                            1, True, @MusicCallback) then
    MsgBox('XBass - error(s) occured while creating.', mbError, MB_OK);

  { CleanUp }
  FXUnPckrFree;
end;

.
Attached Images
File Type: png 00.png (20.7 KB, 125 views)
File Type: png 01.png (19.4 KB, 127 views)
Attached Files
File Type: rar XBass_f v4.1 - [build 2024-July-13].rar (3.97 MB, 18 views)
Reply With Quote
The Following 7 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (14-07-2024), Ele (16-08-2024), Fak Eid (18-07-2024), hitman797 (14-07-2024), Lord.Freddy (15-07-2024), ScOOt3r (14-07-2024), y_thelastknight (03-08-2024)
  #9  
Old 01-08-2024, 09:12
Fak Eid Fak Eid is offline
Registered User
 
Join Date: Jun 2023
Location: Mars
Posts: 144
Thanks: 89
Thanked 136 Times in 53 Posts
Fak Eid is on a distinguished road
Hi Blackfire,

With the latest update, it seems that the spectrum is not responding to the music. If it is working as expected, can you please demonstrate it with some example?
Reply With Quote
  #10  
Old 04-08-2024, 17:28
PHM2D's Avatar
PHM2D PHM2D is offline
Registered User
 
Join Date: Mar 2024
Location: Area 51
Posts: 8
Thanks: 4
Thanked 4 Times in 2 Posts
PHM2D is on a distinguished road
Visualizer Spectrum

Does this come with a spectrum?
Reply With Quote
  #11  
Old 15-08-2024, 09:48
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,393 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by Fak Eid View Post
Hi Blackfire,

With the latest update, it seems that the spectrum is not responding to the music. If it is working as expected, can you please demonstrate it with some example?

to function correctly, the 'spectrum' requires the xbass.dll to be compiled with a newer version of Delphi. in the last release, i compiled xbass with an older Delphi version to reduce file size, as newer Delphi versions typically produce larger executables.

here's the same xbass.dll compiled with a newer version of Delphi. the spectrum works as expected with both vanilla InnoSetup and FMXInno.


.
Attached Images
File Type: png 0.png (28.5 KB, 47 views)
File Type: png 1.png (95.8 KB, 49 views)
Attached Files
File Type: rar XBass_f v4.1 - [build 2024-Aug-15].rar (4.68 MB, 22 views)
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (15-08-2024), Ele (16-08-2024), ScOOt3r (15-08-2024)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
QUERY: editing CloneCD images & best for game data & music CDs andwan0 CD/DVD Software & Utilities 2 18-05-2009 19:13
HELP: CloneCD+cuesheet games no music dhruba.bandopadhyay CD/DVD Copy Protections & Utilities 1 07-10-2006 01:45
srs soundtrack mCrvn Media Files 0 14-06-2005 12:44
problems finding game music Waffle King PS2 Games 0 18-08-2003 08:51
music but no music felt DC Games 0 16-03-2001 16:34



All times are GMT -7. The time now is 10:10.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com