Davide Beatrici (@davidebeatrici) commented about dlls/winepulse.drv/pulse.c:
stream->clock_lastpos = stream->clock_written = 0;
stream->pa_offs_bytes = stream->lcl_offs_bytes = 0;
stream->held_bytes = stream->pa_held_bytes = 0;
stream->period_bytes = pa_frame_size(&new_ss) * muldiv(stream->mmdev_period_usec, new_ss.rate, 1000000);
stream->real_bufsize_bytes = size;
stream->bufsize_frames = new_bufsize_frames;
stream->ss = new_ss;
size = 0;
NtFreeVirtualMemory(GetCurrentProcess(), (void **)&stream->local_buffer, &size, MEM_RELEASE);
silence_buffer(new_ss.format, new_buffer, size);
stream->local_buffer = new_buffer;
}
}
Since the operations are more or less the same as in `pulse_create_stream()`, could you create a helper function in a separate commit (that will be first in the list), please?