Qbasicnews.com

Full Version: Can one use .wav/.mp3 etc.. with QB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can one use .wav/.mp3 etc.. with QB?
I wanted to know if I could write a program in QBasic which played a sound file if the user pressed a key?

And would it be difficult to do for a beginner to write?

Cheers,
Leke.
I don't recommend writing your own WAV and MP3 play routines to beginners. It requires a lot of studying about the WAV, MP3 format and about the SB.

Instead, you can use already writting routines which are included in some libraries. Take a look at DS4QB++, BWSB, UGL MOD Player, QMidi. You can get most of them on the internet. If you have questions using these libraries, call us again Smile
You download Direct Sound 4 Qbasic 2 etc. I use this program. (Good!)
Thanks,
I'll look into it.
Regards,
Leke.
two questions:

1 . bs4qb works in PLAIN DOS ?
2. it plays MP3 ?
DS4QB does not work in plain dos.

Yes, it does play .mp3.
i'd hesitate to use ds4qb & mp3s, though. mp3s in general are processing hogs, and you need a powerful computer to play them. You're better off with mods for higher quality music, because ds4qb tends to create a lag to begin with. sure, it works, but it's like having full-motion video on a pacman clone.
If you want to *really* be able to play .mp3 files then I think you would want to break your head over converting mp3s to wav files and then use any wav player Wink
But decoding mp3 is quite difficult.