[Message Deleted]
-
You can't use more than one instance of a SoundPlayer and have them all playing at the same time. You'll have to use the MediaPlayer component to play the background sound and use the SoundPlayer to play your button click sounds.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I believe (from previous research a while ago) it can be done with DirectX. I've never attempted it so I can't offer any working samples/articles but adding that into your search terms may yield some useful results.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
You can use: 1) DirectX 9 Managed Wrapper which I understand to be obsolete
using Microsoft.DirectX.AudioVideoPlayback;
...
BackgroundMusic = new Audio(fileName, false);
BackgroundMusic.Play();and
using Microsoft.DirectX.DirectSound;
...public class Sound : IDisposable
{
private static Device SoundDevice;
private SecondaryBuffer MyBuffer;
...public static void Initialize()
{
SoundDevice = new Microsoft.DirectX.DirectSound.Device();
SoundDevice.SetCooperativeLevel(Form.Handle, CooperativeLevel.Priority);
}
...
public Sound(string AudioFileName)
{
BufferDescription desc = new BufferDescription();
desc.Flags = BufferDescriptionFlags.ControlPan | BufferDescriptionFlags.ControlVolume |
BufferDescriptionFlags.ControlFrequency;
MyBuffer = new SecondaryBuffer(AudioFileName, desc, SoundDevice);
}
...
MyBuffer.Play();Go to DigiPen Webcast[^] Puc The Pirate - Hour 11 2) OpenAL, I don't have an example but there are example in the Toa Framework[^]
ARon