Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows with qbasic

Status
Not open for further replies.

KenshinHimura

Programmer
May 8, 2003
91
US
I have a couple questions....
#1 I was wondering how to play midis, wavs, etc... with windows resources? I know that if u
SHELL "rundll dllfile,command" u can use dll files functions, but how do u specify the different arguments.
For example SHELL "rundll mmsystem,mcisendstring", I want to know how to send the variables.
Well, I got SHELL "rundll mmsystem,sndplaysound file.wav" to work, but i dont know how to stop it once it starts playing and I can't add nemore arguments except the filename. I cant figure out how to add the SND_LOOP] function or any others.
And I also have one more question. How would u close a program using qbasic. Like if realplay.exe was open and u wanted to close it by sending a command from basic.
So please help me if u can. :)
 
You can shell and use windows wav player, it is described in detail on buff's website. If you want to controll how it plays, you will have to get wav players coded in qbasic, and implement one of them in your program.
 
The easiest way to do this is to find a .wav player that comes with a few sample .wavs. the reason that you want to do this is because that most qbasic wav players are very specific about the format of the wav, if you have a sample wav you can look at it and tell exactly which format it plays. There are hundreds of different formats of wavs:
8KHz - 48KHz, mono and stereo, PCM, DSP, GSM...


"You idiots, teacher was trying to teach you to be great artists, but you've only learned to be great mimics"
-Unknown taoist artist
Originality is the key to greatness
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top