I\'ve made a button class that checks if a button is selected (when the mouse is hovering over the button). When the button is selected, unselected or clicked it plays a wav
Decreasing the size of the buffer will reduce the latency. The buffer must be a power of 2. The default buffer is 4096, but you can change it when you initialize mixer as shown below: