This needs to get cleaned up, which will also involve rewriting some code already based on the current implementation such as g_audio.