Add unittests, correct bug in audiostream range