N
Nico7c
Guest
Hi everyone!
So, I'm just starting with GM and wanted to get familiar with it with a simple project: a rhythm machine.
Basically: a grid of buttons on screen, each time a button is pressed, a specific sound is played. Add a looped beat on top and you have a cool toy!
But here is my problem: each sound (for each button) is a very simple .wav (1 second max, no blank part at the start/end) but when I play it, there is clearly a half second delay between the press of a button and the sound being played. Tested on Android is getting even worse. And a rhythm game that is not perfectly responding well... It doesn't work that well
Few details:
- I use a single room in 60 frames
- I tried checking a left click press with the default event
- I also tried checking for a left clik every step
- I added a counter to see if my entire game was lagging, it's not the case (the counter increment right on the click, even though it's happening after the sound being played)
- I use the audio_play_sound function
- I tried compressing or not the .wav, changing quality, mono/stereo, they are all max 20kb in size, nothing change
Any idea what could be the issue here?
- I heard about Android having sound lag, but it happens on windows also (and .5s seems ridiculously long)
- Should I try to find a dll handling better audio? If so any idea which one?
I'd be very glad to hear of a magical box to tick somewhere that would solve my issue
Hope you'll be able to help me!
Thanks a lot!
So, I'm just starting with GM and wanted to get familiar with it with a simple project: a rhythm machine.
Basically: a grid of buttons on screen, each time a button is pressed, a specific sound is played. Add a looped beat on top and you have a cool toy!
But here is my problem: each sound (for each button) is a very simple .wav (1 second max, no blank part at the start/end) but when I play it, there is clearly a half second delay between the press of a button and the sound being played. Tested on Android is getting even worse. And a rhythm game that is not perfectly responding well... It doesn't work that well
Few details:
- I use a single room in 60 frames
- I tried checking a left click press with the default event
- I also tried checking for a left clik every step
- I added a counter to see if my entire game was lagging, it's not the case (the counter increment right on the click, even though it's happening after the sound being played)
- I use the audio_play_sound function
- I tried compressing or not the .wav, changing quality, mono/stereo, they are all max 20kb in size, nothing change
Any idea what could be the issue here?
- I heard about Android having sound lag, but it happens on windows also (and .5s seems ridiculously long)
- Should I try to find a dll handling better audio? If so any idea which one?
I'd be very glad to hear of a magical box to tick somewhere that would solve my issue
Hope you'll be able to help me!
Thanks a lot!