Bug fix: audioplayer

Code that should have been under a if __name__ == '__main__' was not.
This has been fixed.