Moved OS-specific audio code to separate class