Issue #1840: update version to v2.1.2 beta

update version to v2.1.2 beta and  sync audio end() function to master branch.