Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,924 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,943 people online right now. Registration is fast and FREE... Join Now!




Playing Multiple WAV Files

 
Reply to this topicStart new topic

Playing Multiple WAV Files

RodgerB
18 Jan, 2008 - 06:24 AM
Post #1

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,166



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
I started making my game recently, and I am having some trouble with the sound. I am able to play a background loop, and have it continue running as expected, but when I move my mouse over a menu item, a bleeping noise occurs like any hardcore game wink2.gif.

Thing is, when this bleeping noise occurs, the background loop stops playing. I have been able to have both running using the Media Player SDK (it is really slugish for the beeping noises so I just continued to use the Media.SoundPlayer method) like so:

CODE

Dim bgLoop As New WMPLib.WindowsMediaPlayer
bgLoop.URL = "C:\iRsexyURL\omgIamAWAVFILE.wav"
bgLoop.settings.setMode("loop", True)


However if I spam the menu items, the background loop randomly stops. Does anybody have any ideas as to how I can play multiple WAV files without interuptions? Thanks. smile.gif
User is offlineProfile CardPM
+Quote Post

RodgerB
RE: Playing Multiple WAV Files
18 Jan, 2008 - 01:25 PM
Post #2

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,166



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
It managed to fix itself?! crazy.gif

I was able to use both the Media.SoundPlayer and the My.Computer.Audio.Play method. Thanks anyway. smile.gif

This post has been edited by RodgerB: 18 Jan, 2008 - 01:25 PM
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Playing Multiple WAV Files
18 Jan, 2008 - 05:23 PM
Post #3

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,317



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Glad you were able to resolve the issue you were having.
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Playing Multiple WAV Files
20 Jan, 2008 - 07:49 AM
Post #4

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 4,029



Thanked: 38 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
I was going to suggest some Win32 API Functions but since you've managed to do it in pure .NET, stick to that smile.gif
User is offlineProfile CardPM
+Quote Post

RodgerB
RE: Playing Multiple WAV Files
20 Jan, 2008 - 02:44 PM
Post #5

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,166



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
QUOTE(born2c0de @ 21 Jan, 2008 - 02:49 AM) *

I was going to suggest some Win32 API Functions but since you've managed to do it in pure .NET, stick to that smile.gif


Lol, just read back over it and I didn't word it right wink2.gif.

I was able to use the WMP Com API, to do the background loop, and use both the .NET methods to play sound effects. I tried using the Win32 API but found no success, as it was a real slow poke compared to the other methods, even after allocating a new thread. smile.gif
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Playing Multiple WAV Files
23 Jan, 2008 - 05:58 AM
Post #6

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 4,029



Thanked: 38 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
lol.
Well, at least you got it working wink2.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 02:54PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month