Multiple MP3 at the same time? Now it's possible!

Blitz3D Forums/Blitz3D Userlibs/Multiple MP3 at the same time? Now it's possible!

SLotman(Posted 2007) [#1]
Have you ever tried to play more than one MP3 on Blitz3D and found out it could only be done by using external libraries like BASS or FMOD? And the worse, you have to pay a lot of money for them if you do a commercial project...

Well, worry no more, I just developed a library (with pure Blitz3D code) that uses Windows MCI to play MP3 files.

You can open multiple files at once, play them, pause/resume/loop, get song length and position, change their volume, speed, etc - with minimum overhead; and you can load/unload the songs at any time, unlike Blitz PlayMusic!

Also, you can use all normal blitz sound/music-related commands together with this lib!

You can get the sample code (without the .decls file and the include) to test it (comes with pre-compiled sample) and see how it works. I successfully tested it on Win98 and WinXP.

This code should work on any Windows machine, as long as you are able to play MP3 files on Windows Media Player.

The sample can be downloaded from here: http://www.icongames.com.br/mciMP3/mciMP3.zip

My question: is this worth something? I was thinking about a price around $10. Would anyone be interested in purchasing such lib? I still would have to make an website for it, documentation, etc.

I would also would like to know if anyone finds some bug on the sample, so I can track it down. It shouldnt have any, but you never know ;)


_33(Posted 2007) [#2]
- Paying to use Windows MCI? No way.
- Paying royalties to FMOD? It's in Blitz3D already.
- Am I worried about playing multiple MP3s in Blitz3D? Nope, it does the job already.

Thanks for the offer, but it's balloneys.


SLotman(Posted 2007) [#3]
Sorry, but it's not 'balloneys'; read the problems involving Blitz and MP3 on these topics:

http://www.blitzbasic.com/Community/posts.php?topic=6279
http://www.blitzbasic.com/Community/posts.php?topic=20956

PlayMusic only loads one song at a time. And using PlaySound to play music uncompress the whole file to memory (not nice to have a 3Mb MP3 expanded into 30Mb of RAM)

With this lib you can have several MP3s opened at the same time, play every one of them when you want, without having to load all of them at once, and without stopping your program until the file finished loading.

Just try the sample, you'll see. It's not something that could be done with PlaySound/PlayMusic, otherwise I wouldnt even waste any time coding this.


_33(Posted 2007) [#4]
BASS 2.3 Shareware license: €100

Not bad for a product that has stability, features, playback performance. I prefer to shell out that amount of money over using Windows MCI. But as you say, you propose something which is of minimal cost. Yet, what are the features?

I've used Windows MCI before, and I can tell you, it is quite easy to use. If you're proposing a Windows MCI wrapper, then I'd suggest adding the Video portion to it ;)

Look here: http://www.blitzbasic.com/codearcs/codearcs.php?code=1329

Cheers.


jfk EO-11110(Posted 2007) [#5]
I have to say, MCI can be used by anybody. I have released some MCI playing code (for movies, but actually plays anything) and I never thought of selling it. People usually buy

a: what they think is a must-have, because IN-people told them so

b: good things they really need and can't get for free.


SLotman(Posted 2007) [#6]
I understand what you're talking about. I first tought of doing a DX7 DirectSound/DirectMusic DLL, but then I remember I could do the same thing just with MCI - with the extra benefit of not having to include any extra files/dlls...

I bet if it was a DX7 Sound DLL, people would be jumping up and down, even if it would do exactly what my MCI lib does... :/

I know people can write their own lib (and that goes to just about everything), but they could save development time buying cheap code... but that's just me, I guess.

As for built-in support on Blitz, you can't seek or change MP3 pitch in Blitz... not to mention that the loading process is much faster than with native Blitz LoadSound.

But anyway, if noone wants it, too bad - I developed it to use on another game I'm making, which needs to change the music being played at real time; took me less than 5 minutes to change my game to use this lib instead of PlaySound ^_^

It would be nice though if someone could test the sample on Windows Vista/2000 and comment if it works or not...