Playing multiple wav files in Delphi 2006

Hello everyone :)

I am a total Delphi newbie having recently moved from Visual Basic 6. Loving the language but finding it hard to do a few things.

I need to be able to play several short sounds (longest is less than 30 seconds) on top of each plain english

Sound1 = Filename
Sound2 = Filename
Sound3 = Filename
Sound20 = Filename

then i have to be able to something like


the sounds should not stop the app from running and should only play once. I also need to be able to do a

Sound1.volume = 50 ; volume levels would be something like 0 per cent to 200 per cent.

All of the files are wav format...but if I could use MP3 then that would be an added bonus (not necessary tho)

I have tracked down the Jedi-Delphi headers for DirectX9 SDK but on downloading I dont find anything I recognise that would help me...I just see a lot of pas files. As I said I have never used Delphi before and am totally new to it. But I believe that DirectSound is the way I would like to go.

Would anyone familair with the Jedi DirectX9 headers be able to help...or assist me in learning what it is I need to make this work?

Would really appreciate your help. I'm assigning 500 points to this question because its pretty urgent I get this functionality up and running.

Who is Participating?
Mohammed NasmanConnect With a Mentor Software DeveloperCommented:
Hello Brommers,

You can easily use PlaySound API, to play wav sound files, you can play them Simultaneously use SND_ASYNC in the third parameter

or use SND_SYNC to play them one after one

uses MMsystem;

procedure TForm7.Button1Click(Sender: TObject);

if you need more advanced and better way to work with sound files, look dsPack, it's a open source project to work with multimeda files using DirectX, but in easier way than JEDI one, you can build your own Media player with DsPack easily ;-)

BTW, welcome to Delphi world, it's much better than VB (me old VBers :D)

BrommersAuthor Commented:
Hi mnasman :)

the PlaySound API unfortunately isn't powerful enough for what I want to do. I did have a look at the DSPack some while ago but at that time Delphi 2006 had only just been released and there were no instructions on how to install it to work under 2006. Looking again I can see someone has posted on how to install I will take a look at it in more depth. However it is I think more a wrapper for DirectShow than DirectSound...

Thanks for your help, will post back here if I  can get it to work

BrommersAuthor Commented:
hello Mnasman :)

after researching for nearly 12 hours I came across a 3rd party sound library called BASS

its an API driven system, costs $100 but the power it has after experimenting with it for just over 2 hours now is more than satisfying. I'll use this system I think :)

Thanks for posting with your help, and as you were part of the solution lifetime, I'm awarding you the points for the help you gave.

All the Best,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.