I'm not sure how could I test this behavior, right now the test I wrote works but there are times where it doesn't enter into the deadlock.
-- v4: evr: Remove process input handling from streaming thread. evr: Don't lock allocator in NotifyRelease call. evr: Create critical section for sample queue. evr: Release sample queue when streaming ends.