• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 130
  • Last Modified:

3 Tmediaplayer

Hi,
under D3 / WIN98 i want to play WAV-files with the Tmediaplayer.
And i want to play three wav-files simultaniously.
Therefore i have created three mediaplayers on one form.
But only the first one which is started plays.
The others do not play.
Although the parameter WAIT is set to FALSE (=no waiting till the end).

WHY ?

Thanks !
Titz

0
titz
Asked:
titz
  • 3
  • 2
1 Solution
 
EpsylonCommented:
Sorry, you can only play a wav on 1 MediaPlayer at a time. Next to that most soundcard can't handle it eighter.

Epsylon.
0
 
simonetCommented:
Titz,

What Epsylon said is true. Your system (not your program) can only play 1 wave file at a time. This both is a PC hardware and Windows limitation.

There is, however a workaround for that: you can mix the wave files, so that it sounds like they are 3 different sounds being played at once, but they are actually only 1 source of sound, which is made up of up to 8 wave files.

There's already a library that allows you to mix wave files, and still work with other sound formats. You can find more info about this library + some Delphi sample code at:

http://www.undu.com/Articles/980422c.htm
http://www.undu.com/Articles/980228a.htm

The library in question is MIDAS Digital Audio System, and links to where you can download it from can be found in the links above.

Yours,

Alex

0
 
titzAuthor Commented:
hi simonet,

is there no other possibility than to use MIDAS ?
i think the solution by mixing is ok, but i would like a solution without another great system, which i do not know.

titz
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
simonetCommented:
You can actually code the whole thing by hand, but that's neither fast or safe.

I *really* advise you to use MIDAS, since it's very stable, easy to use, free, well documented and supports Delphi.

As far as I know, there's no other free library that compares to MIDAS. Sorry if that disappoints you, but giving MIDAS a try is very worthwhile.

Please give it a try.. using MIDAS, it's not as hard as you think. If you decide to do it by not using MIDAS, then things are very, very complicated.

Yours,

Alex
0
 
titzAuthor Commented:
hi alex,

ok, i will try midas.
i hope, it will not take a lot of cpu-power. because i want to use it in a game and the cpu-power is needed for the motion.

thanks and greetings
titz
0
 
simonetCommented:
MIDAS was primarily developed for use in game engines.

ALex
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now