Closed padenot closed 3 years ago
@ChunMinChang, this is similar to what we do in the mac backend, conceptually, but there is a way to know how much is buffered there, to not trim when there is not enough data, instead of trimming in all cases and returning early when there's nothing to do.
If
input_frame_count
>nframes
> _frames in input_buffermanager, then we may have a out-of-sync problem betweeninput_frame_count
andinput_buffer_manager
. I'd prefer we totally remove theinput_frame_count
and only useinput_buffer_manager
to calculate frames, if this is the case (IIRC, this is what macos backend does).
I'll do this, it's better.
This is what we need. When starting a stream, there are two cases:
get_linear_input_data()
underruns gracefully and fill the remaining space with silence.