lock around sample set native events to avoid concurrency bugs with buffer filling
fix a few ui bugz