alternative for mci-commands

Just starting out? Need help? Post your questions and find answers here.
Susan20
User
User
Posts: 19
Joined: Fri Feb 29, 2008 1:10 pm
Location: Berlin

alternative for mci-commands

Post by Susan20 »

I wrote a mp3/wma-Player with some functions like display of the ellapsed and remaining time and jumps of certain time increments. I used the mci-send-string commands for that purpose. However, people told me that it is old-fashioned to use mci-commands. Does anyone know alternative commands with which I can handle mp3- and wma-files and which offer the same functionality as mci?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: alternative for mci-commands

Post by PB »

MCI is still fine for playback.
Last edited by PB on Wed Aug 13, 2008 2:42 pm, edited 1 time in total.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

It's not only old-fashioned, it became extinct. It's a very old and primitve way of communicating with sound hardware. It's doesn't uses real drivers to directly access the hardware and allow the creation of a spectrum analyzer for example. It's very limited and should be used for simple playback only. If you really intend to write a decent media player there lot's of better alternatives like WaveMapper, DirectSound or libraries like FMOD and BASS.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Susan20
User
User
Posts: 19
Joined: Fri Feb 29, 2008 1:10 pm
Location: Berlin

Post by Susan20 »

@Fluid Byte

You mentioned WaveMapper, DirectSound, FMOD and BASS. My question is: what do you recommend? I'm only a beginner with regard to programming. So the easiest way for me would be, if I could copy a lib into /PureLibraries/UserLibraries and if there would be a helpfile, in which the commands are explained.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

If you are new to PB and programming in general forget WaveMapper and DirectSound, you don't need to torture yourself with that. These are drivers for the sound output that libraries like FMOD or BASS support by default so you don't have to worry about that. So now the question is to either choose BASS or FMOD. Personally I would tend to use FMOD since I have written a player myself with it and it just eats everything you feed it with and it's very realible as well.

What you need to do first is to download the FMOD package here:

http://www.fmod.org/index.php/download# ... rammersAPI

A comprehensive documentation is included in that package that is similar to the PB manual. Secondly you need to download the FMOD include file by froggerprogger to use FMOD in PB. You can get that here:

http://purebasic.fr/english/viewtopic.php?t=25144

It's for a slightly older version of FMOD but that doesn't matter because the API hasn't fundamentally changed and is upwards compatible.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Susan20
User
User
Posts: 19
Joined: Fri Feb 29, 2008 1:10 pm
Location: Berlin

Post by Susan20 »

@Fluid Byte

Thanks a lot for your support!
Post Reply