Playing WAV files and MIDI files 
Author Message
 Playing WAV files and MIDI files

Hi,

I'm looking for a good way of playing WAV and MIDI files. The method has to
allow the stopping of the MIDI or WAV file playing during playback and also
optional looping.

I have a API method for WAV files, but the playing of the WAV freezes the
program until the WAV file has finished. Not what I'm looking for.

Can anyone help? I'm looking for a nice short, sweet and easy answer.

I'm using VB6

Cheers

Stuart



Tue, 16 Mar 2004 04:10:06 GMT  
 Playing WAV files and MIDI files


Quote:
> Hi,

> I'm looking for a good way of playing WAV and MIDI files. The method has
to
> allow the stopping of the MIDI or WAV file playing during playback and
also
> optional looping.

use the mciSendString API function. This site has a wealth of info on it

http://www.geocities.com/smigman.geo/mci/mci.html

Quote:

> I have a API method for WAV files, but the playing of the WAV freezes the
> program until the WAV file has finished. Not what I'm looking for.

If you're using PlaySound or sndPlaySound, you want to specify the Const
SND_ASYNC (&H1) instead of SND_SYNCH ( which I assume you're using). That
way the sound will play asynchronously (i.e. the program continues execution
while the sound is playing).
Quote:
> Can anyone help? I'm looking for a nice short, sweet and easy answer.

> I'm using VB6

> Cheers

> Stuart



Tue, 16 Mar 2004 04:40:16 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Playing WAV and MIDI files in VB 4.0

2. Playing .wav files or .mid files

3. Playing a .wav File from a .vbs File

4. .vbs file to play a .wav if file size does not equal 0

5. How to play MIDI and WAV from VB ????

6. HELP: Can't play MIDI and WAV at same time

7. How to play MIDI and WAV from VB ????

8. Midi and Wav auto-play

9. Playing Large Wav and Midi without DoEvents

10. How To Play MIDI/WAV Sounds

11. Playing Large Wav and Midi without DoEvents

12. Play WAV and MIDI

 

 
Powered by phpBB® Forum Software