After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759890 - audioconvert: creates choppy audio
audioconvert: creates choppy audio
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-26 22:43 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2015-12-29 13:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bisect notes (11.91 KB, text/plain)
2015-12-26 22:43 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
Details
wave file showing the gaps (826.94 KB, audio/wav)
2015-12-26 22:44 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
Details

Description Stefan Sauer (gstreamer, gtkdoc dev) 2015-12-26 22:43:59 UTC
Created attachment 317911 [details]
bisect notes

With the new code powering audioconvert I get choppy audio in buzztrax. It looks like as if the 1/4 part of a buffer is good and the next 3/4 are filled with low bit noise (see attached wav). I am testing at gst-plugin-base (69d3b098a2c2eed02af6916d8798995a139f5de9). I've tried to bisect it, but the problem is that since audioconvert was touched by

e3f0f3b91ef8468187a65632aa9cc2b4aa4bb5a1 is the first bad commit
commit e3f0f3b91ef8468187a65632aa9cc2b4aa4bb5a1
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Fri Nov 6 17:49:00 2015 +0100

    audio-converter: move audio converter to audio libs
    
    Move the audio-converter helper to the audio library.

Starting from that commit running my app results in no playback at all, but:
** (buzztrax-edit:2095): CRITICAL **: gst_audio_converter_samples: assertion 'out_produced != NULL' failed
0:00:13.907141581  2239 0x7fcaec032800 WARN            audioconvert gstaudioconvert.c:768:gst_audio_convert_transform:<freeverb 00_master:audioconvert> error: error while converting
** (buzztrax-edit:2095): CRITICAL **: gst_audio_converter_samples: assertion 'out_produced != NULL' failed
0:00:13.917307830  2239 0x7fcaec032a30 WARN            audioconvert gstaudioconvert.c:768:gst_audio_convert_transform:<bass_FSM-PanzerDelay:audioconvert> error: error while converting


Later (ff6d1a2a25b247688f38e117782a6b43d525706a) something changed and instead I get one of 3 different crashes (see the log).

Again later (8bcf183c7ffcc8aa887ce9e6b4f36c44037bbf89) that was fixed, but now I have the choppy audio. The audio issue might have been there from the start of the changes though.

I don't have a simple launch pipeline as a repro yet. The audio format in buzztrax is F32, mono/stereo interleaved.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2015-12-26 22:44:37 UTC
Created attachment 317912 [details]
wave file showing the gaps
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2015-12-26 23:24:27 UTC
There is https://bugzilla.gnome.org/show_bug.cgi?id=659798 that is about buffer alignment. My sources are all basesrc derived elements that use the default alloc function of basesrc.

The buffers I process my have any size liek e.g. "1323" depending on the tempo of a song. The buffers might also change in size over time.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2015-12-27 17:41:07 UTC
Repro:
gst-launch-1.0 audiotestsrc ! audio/x-raw,format="S16LE" ! audioconvert ! audiopanorama ! autoaudiosink

with longer pipelines more harsh-electro noise \o/
gst-launch-1.0 audiotestsrc ! audio/x-raw,format="S16LE" ! audioconvert ! audiopanorama ! audioconvert ! audio/x-raw,format="F32LE",channels=2 ! audioconvert ! autoaudiosink

gst-launch-1.0 audiotestsrc ! audio/x-raw,format="S16LE" ! audioconvert ! audiopanorama ! audioconvert ! audio/x-raw,format="F32LE",channels=2 ! autoaudiosink
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2015-12-29 13:41:59 UTC
commit 7bbfa39ada905b44743170f6c29d13e5fefb5888
Author: Stefan Sauer <ensonic@users.sf.net>
Date:   Tue Dec 29 14:23:59 2015 +0100

    audioconvert: fix passthrough operation
    
    We did not take the sample size into account. Rearrange the tests to have more
    conversion test and an extra test case for passthrough operations.
    
    Fixes #759890