Here a simple chip8 emulator which contains two callback for receive the sound play event and the screen redrawing.
This is my first experience with emulation. The debugging is so long for search some error instruction. This is a exponential repercussion on your program tested on Chip8.
Firepolo