Warnings with wasapi2src


I am using the wasapi2src element in a pipeline (wasapi2src ! queue ! audioconvert ! audioresample ! audiobuffersplit output-buffer-duration=1/50 ! audioamplify amplification=2 ! appsink caps=audio/x-raw,rate=8000,channels=1,format=S16LE emit-signals=true).
Some of my users are getting a lot of warnings “Found 128 frames gap” in the gst_wasapi2_ring_buffer_read function.

What can be the source of this issue?

wasapi2src will warn if sample position reported by device via IAudioCaptureClient::GetBuffer is not contiguous, which may indicate there’s a bug in driver or system is overloaded or so.

Are you capturing audio from actual audio device (line-in device for example) or doing loopback capture? does wasapisrc (not wasapi2src) work well?

We moved completely away from wasapisrc due to the huge memory leak when a peripheral suddenly disconnects. But I think we didn’t have these frame gap issue with wasapisrc.
And yes, it’s a real audio peripheral we are trying to get the sound from.

Could you test latest main branch or 1.23.90 dev release?

there were couple of wasapi / wasapi2 fixes recently, wasapi2: Respect ringbuffer buffer/latency time (!6141) · Merge requests · GStreamer / gstreamer · GitLab for example.

We’ll try it and give you some feedback.