playing a wav file in visual basic while another is playing - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

playing a wav file in visual basic while another is playing

TigaclawTigaclaw Posts: 12Member
Hello! I would love it if someone could tell me how I can play a wav file while another one is playing. I can already play a wav file without the program freezing while it is playing, but cannot play two wav files at once. This would be useful for background music in games. I am aware that there is an ocx file for download, but I would greatly appreciate it if someone could teach me how to do it without that file. Any help is greatly appreciated.
Tigaclaw

Comments

  • PsightoplazmPsightoplazm Posts: 332Member ✭✭
    You're probably using what I've used to play sounds and that was the sndPlaySound APIs, but from my understanding to play something in the background on a different channel you have to use the WaveIn and WaveOut APIs, there is like 15 of them or something and I've never used them. But apparently you tell they system to start playing from a device or file and keep going on about your merry way.

    I had to get simutaneous sound play once and the quickest thing I could come up with is, I wrote another exe that would play the sound that I loaded into it's command line. This way I could call that program as many times as I wanted and get as many sounds as I wanted to play at the same time. I wonder if this idea would work if you made a control and loaded it more than once on a form. Once for each channel of play or something.

    Maybe I'm just stupid and don't know what I'm talking about :P
    ><//~Psightoplasm`~

Sign In or Register to comment.