Audio player test

Fix part of #589 to add unit test for audio playing.