blah blah blah is here! blah blah » Close

up0down
link

hello, im programming in windows application and using this code for sound:
System.Media.SoundPlayer player = new System.Media.SoundPlayer();
player.SoundLocation = @"..\\ctf.wav";
player.Play();
the problem is that when i use 2 sounds or more, like one for the background of the game and one or more for special effects the sound of the background (which is plaid in loop) is interrupted and stopped. i know that the problem is that both of the sounds play in new thread but when i play one of them in PlaySync it doesn't solve the problem, so please if anyone has a code or can just explaing me how to make to sounds not to inerrupt each other ill thank him a lot.
good day to everybody.
Jake

last answered 2 years ago

1 answers

up0down
link

there are some media players other than the framework media player such as ogg player which has no license issues like mp3. so search for an ogg media player library managed code in google and use it.

This post was imported from csharpfriends, if you have a similiar question please ask it again.

All previous members have been migrated, hope you enjoy the new platform!

Feedback