GNOME Bugzilla – Bug 796704
audiobasesrc: Segsize must be an integer multiple of the sample size
Last modified: 2018-07-18 14:18:02 UTC
Created attachment 372861 [details] [review] fixbug when I use gstreamer to record, just like bellow: gst-launch-1.0 pulsesrc ! capsfilter caps=audio/x-raw,rate=22050,channels=2 ! wavenc name=enc ! filesink location=input.wav There will be many erros occur: CRITICAL **: gst_audio_reorder_channels: assertion 'size % ((info->width * channels) / 8) == 0' failed I hacked the code, and found the reason. Size of gstbuffer must round to an integer number of samples, isn't it? look at my patch, it is perfect.
By the way, if rate=22050,channels=1, there will be loud noise. By patch also can resolve it. I think it is because size of gstbuffer(441) is not round to bpf(2). My Audio device: 00:14.0 Audio device [0403]: VIA Technologies, Inc. VT8237A/VT8251 HDA Controller [1106:3288] (rev 30)
commit 9f516077233dcd0986e94c769cd605b01ecba41b (HEAD -> master) Author: wangzq <qiang_jsj@live.cn> Date: Thu Jun 28 20:13:04 2018 +0800 audiobasesrc: Round down segsize to an integer number of samples https://bugzilla.gnome.org/show_bug.cgi?id=796704