Rewrite the sound function to not be an infinite loop anymore, and to properly check for buffers being full or queueing to send audio to the DSTwo. This fixes Pokémon LeafGreen crashing with manual frameskip 0, as well as sound offsetting itself 20 times per second with any manual frameskip. (DSTwo-specific)