Closed Matias-Barrios closed 5 years ago
Hi @Matias-Barrios, could you provide a simple way to reproduce the issue? Thanks!
@veeableful, you can clone my repo directly. Then you let yourself lose which in turn draws You lose on the screen and waits for any key being pressed. Thing is, in order to read that key I'm looping through events. When I do that all sound is messed up from that point onwards
Hi @Matias-Barrios, could you try using the master branch? I have pushed a similar fix to #420 :relaxed:
@veeableful Sure. I'll do. I'll let you know the outcome. Thanks
@veeableful Done! It works like charm now. Thanks!
In the game I am making I am polling for vents on the game loop, which works fine and it has no problems. The problem arises when Im trying to poll for events from a module within my app.
I have crated this function that imitates a single key press :
https://github.com/Matias-Barrios/SDL_Universe/blob/master/elements/elements.go#L101-L117
But if I call it from another method as I am doing it here :
https://github.com/Matias-Barrios/SDL_Universe/blob/master/elements/elements.go#L89-L99
The once it goes to the main loop again. the sound is messed up.This issue looks suspiciously similar to this : https://github.com/veandco/go-sdl2/issues/420
Can someone help me fix this?