|
|
|
#1
|
|||
|
|||
|
Can someone share me an example as how to use .ogg files in IXBass which was supported after xBass.dll v3.0?
|
| Sponsored Links |
|
#2
|
||||
|
||||
|
Quote:
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;
. |
| 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 (14-07-2024), ScOOt3r (14-07-2024), y_thelastknight (03-08-2024) | ||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 18:13 |
| HELP: CloneCD+cuesheet games no music | dhruba.bandopadhyay | CD/DVD Copy Protections & Utilities | 1 | 07-10-2006 00:45 |
| srs soundtrack | mCrvn | Media Files | 0 | 14-06-2005 11:44 |
| problems finding game music | Waffle King | PS2 Games | 0 | 18-08-2003 07:51 |
| music but no music | felt | DC Games | 0 | 16-03-2001 15:34 |