Playing .wav or .mp3 files from QB 4.5

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
tradefutures
Newbie
Posts: 3
Joined: Mon Jan 20, 2014 10:39 pm

Playing .wav or .mp3 files from QB 4.5

Post by tradefutures »

Does anyone have any code experience that can be called as a subroutine or function that will play a .wav or .mp3 file. I have searched high and low on the internet and have found unworkable snippets.

Thanks in advance

Mike
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: Playing .wav or .mp3 files from QB 4.5

Post by burger2227 »

QB64 can play WAV and MP3 sound files plus OGG and others using _SNDOPEN or _SNDPLAYFILE.

You can also control volume and tracks on some types of files. QB never really worked too well with sound. Just PLAY or SOUND worked on most machines. Mostly due to sound card incompatibilities.

QB64 allows you to compile old QB programs into EXE files that can run on newer Windows, Linux and Mac machines.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
tradefutures
Newbie
Posts: 3
Joined: Mon Jan 20, 2014 10:39 pm

SCREEN 12 function for graphic display

Post by tradefutures »

I only get about a quarter of the screen display on the monitor when using the SCREEN 12 in the QB64 compiled version versus the QB45 version. What do I need to do.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: Playing .wav or .mp3 files from QB 4.5

Post by burger2227 »

Just put _FULLSCREEN after the SCREEN mode line. Then it will be full screen.

You can peruse the QB64 WIKI to see a list of the new keywords here:

http://www.qb64.net/wiki/index.php/Keyw ... phabetical" target="_blank
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
tradefutures
Newbie
Posts: 3
Joined: Mon Jan 20, 2014 10:39 pm

Re: Playing .wav or .mp3 files from QB 4.5

Post by tradefutures »

Thanks so much for the prompt and accurate reply..
Post Reply