I was trying to make a game with some complicated sound options but I failed. Then I thought, maybe I'm missing something, I should try it with a simplier way and I failed that too so now heres the simple one:
I inserted Mouse&Keyboard, XAudio2 on the layout. Then I wrote:
On key 1 pressed-> 1_XAudio2: Load file AppPath & "1.wav" to channel 1 (No loop)
2_XAudio2: Play channel 1
On key 2 pressed-> 1_XAudio2: Load file AppPath & "2.wav" to channel 2 (No loop)
2_ Play channel 2
on the event sheet. And yes I also added 1.wav and 2.wav to Sounds in the Project.
Now. If I added 2.wav last into Sounds, when I launch the game and press 2, it plays the sound but doesn't play 1.wav. If I added 1.wav last into Sounds and when I launch and press 1, it plays the sound but doesn't play 2.wav. Or maybe it's just a coincidence.
Basically, it plays just 1 of them and doesn't play the other.
I don't understand what the problem is and I don't think I was able to tell you my problem here properly :(. But what I want is:
I want multiple sounds. Example: When I press 1, a sound will play. When I press 2, another sound will play. When I press 3 another and so on...
Please help me I'm thinking about a big game and this is the one and only problem I have.
Thanks in advance.