Huw Davies (@huw) commented about dlls/winecoreaudio.drv/mmdevdrv.c:
TRACE("(%p) Refcount now %lu\n", This, ref); if(!ref){ if(This->stream){
struct release_stream_params params;params.stream = This->stream;params.timer_thread = This->timer_thread;UNIX_CALL(release_stream, ¶ms);
stream_release(This->stream, This->timer_thread); This->stream = 0;
There's also an instance of the `release_stream` call in `AudioClient_Initialize()`.