Fixed double free of wave buffer.
Fixed compiler warnings.
Merge pull request #1496 from akallabeth/alsa_fix

Alsa fix double free