473,394 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Playing multiple sounds

1
Please help, i've looked everywhere on the internet for the answer, but nothing works! here is my problem:

I have a Pong game, and would like to have a background .wav file playing.
I also have .wav files for the sound effects, so when i launch the game, it plays the background loop first, then when something happens it stops the background sound, then plays the effect sound. I want it to either not stop the background loop, or to stop it, play the effect, then continiue where it left off.

i used
My.Computer.Audio.Play(My.Resources.BG_loop, AudioPlayMode.Background)

and

My.Computer.Audio.Play(My.Resources.pongbeep_score , AudioPlayMode.Background)

to play my sounds.

PS i would prefer if the the sound files were in the ressources, for that is how i did it there
May 1 '07 #1
1 2145
Dököll
2,364 Expert 2GB
My.Computer.Audio.Play(My.Resources.BG_loop, AudioPlayMode.Background)

and

My.Computer.Audio.Play(My.Resources.pongbeep_score , AudioPlayMode.Background)

to play my sounds.

PS i would prefer if the the sound files were in the ressources, for that is how i did it there
Greetings and salutations, poo22!

Sounds like you needa select case, If statement/ perhpas a timer added to choose at which point yopu need the sound to pick up where it left off.

Hope this helps...In a bit!

Dököll
May 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kiteman \(Canada\) | last post by:
Instead of a beep sound playing as an alarm or reminder I would like to be able to play a more interesting sound. On the web, I found and tried a sound routine that uses the SOUND.DRV but it does...
1
by: Peter Schmitz | last post by:
Hi, I'm just trying to play a *.wav file, making use of the unmanaged function "sndPlaySoundA" in winmm.dll, but I still got one question: How can I avoid, that the sound file itself has to be...
0
by: Adrian | last post by:
Is there a way in C# to play various sounds (WAV files) simultaneously? I also need to jump to the middle of the WAV files and start playing from there, not just from the beginning. Thanks.
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
8
by: shlomi | last post by:
Hello, It's been long time that I'm investigating on how to play Avi file from memory, with no success. What I'm trying to do is to get a scrambled Avi file to memory, fix same data and...
1
by: Tom W | last post by:
hi I've found some code for playing sounds and it kinda works. This is what I have \\\\\Public Class SoundClas Declare Auto Function PlaySound Lib "winmm.dll" (ByVal name As String, ByVal hmod As...
0
by: A. Gaubatz | last post by:
I am not a very advanced programmer with VB, but I need to be able to play at least two sounds at once, which my current code: SoundPlayer.FileName = "..." SoundPlayer.Play() will not do. Is...
1
by: Terry Olsen | last post by:
Using the following routine to play embedded wav files: Private Sub PlaySound(ByVal Sound As Int32) Select Case Sound Case 1 : My.Computer.Audio.Play(My.Resources.Sounds.GoOnline,...
1
by: sandeepk84 | last post by:
Hi all... I wanted to add a functionality to my software for recording and playing sounds. Does anyone know how it can be done in java? How Sound API can be used? Even if it supports only some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.