[Fix] Fix resource leaks & travis will build with ALSA and PulseAudio support