There's also an audio library known as Bass:
http://www.un4seen.com/
It's pretty similar to FMOD, but easier to use
There's also an audio library known as Bass:
http://www.un4seen.com/
It's pretty similar to FMOD, but easier to use
[pascal]Ok, I have Bass now, but I see several folders and none of them say anything like "play mp3's" how do I set it up in Delphi?
Does it use components?
Or do I have to do the uses thing?
Thanks.[/pascal]
Nicholas.
<br />
<br />Please join: http://holzstukka.proboards81.com
From the website:
Just look for one of the example programs, it should have a delphi example with sourcecode.C/C++, Delphi, Visual Basic and MASM APIs are provided, with several examples to get you started
You have to do the 'uses' thing...
I did, and I didn't understand it.
I need to learn how it's done, and I don't see any tutorials that show me how to do it in Delphi.
Could someone show methe simplest example of how to play an MP3 file in BASS but without all the extra things in the basstest example...
thanks.
Nicholas.
<br />
<br />Please join: http://holzstukka.proboards81.com
you can take a look at glscene, it has sound examples including mp3s..Originally Posted by Voltrox
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
Ok, Thanks.
Well I am currently trying to implement BASS in my project, but it's not working.
[pascal]unit UHXDMMPLAY1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Bass, jpeg, ExtCtrls, Buttons;
type
TForm2 = class(TForm)
Image1: TImage;
FPATHTE1: TEdit;
BTPLAYSTRM1: TSpeedButton;
PSTRM1: TSpeedButton;
STSTRM1: TSpeedButton;
MMFLSTB1: TListBox;
procedure FormCreate(Sender: TObject);
procedure BTPLAYSTRM1Click(Sender: TObject);
private
mods: array[0..128] of HMUSIC;
modc: Integer;
sams: array[0..128] of HSAMPLE;
samc: Integer;
strs: array[0..128] of HSTREAM;
strc: Integer;
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.BTPLAYSTRM1Click(Sender: TObject);
var i: integer;
var f: PChar;
begin
i := MMFLSTB1.ItemIndex;
// Play the stream from the beginning
if i >= 0 then
BASS_ChannelPlay(strs[i], True);
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
modc := 0; // music module count
samc := 0; // sample count
strc := 0; // stream count
// check the correct BASS was loaded
if (HIWORD(BASS_GetVersion) <> BASSVERSION) then
begin
MessageBox(0,'An incorrect version of BASS.DLL was loaded',0,MB_ICONERROR);
Halt;
end;
// Initialize audio - default device, 44100hz, stereo, 16 bits
if not BASS_Init(-1, 44100, 0, Handle, nil) then
begin
Error('Error initializing audio!');
end;
end;
end.[/pascal]
Could someone please help me?
Thank you.
Nicholas.
<br />
<br />Please join: http://holzstukka.proboards81.com
My LEAF2 engine has some easy to use audio objects(WAV & OGG). Its portable and built on top of OpenAL. Also theres video support (AVI).
Check out the tutorials, and see for yourself if it is what you need
www.pascalgameengine.com - Crossplatform 3D game engine
Is their a source version of you engine available?Originally Posted by Relfos
Ian
Not yet, but I can send you the source if you want. Note that it doesnt support MP3, but supports OGG instead, a similar patent free format.
www.pascalgameengine.com - Crossplatform 3D game engine
Could someone show me how to use Bass?
Nicholas.
<br />
<br />Please join: http://holzstukka.proboards81.com
Bookmarks