GNOME Bugzilla – Bug 341431
WAV files choke adder
Last modified: 2007-07-31 15:12:24 UTC
Please describe the problem: I have written a script (http://jonobacon.org/files/gnonlintest.py) that plays a bunch of files at the same time. This works fine for mp3 and ogg files, when I play either an ogg/mp3 + wav or two wav files, I get insanely choppy playback. Steps to reproduce: 1. Run the above script. 2. 3. Actual results: Very bad playback. Expected results: Playback of the audio files without problem. Does this happen every time? Yes. Other information: Many wav files don't provide an error, but when I use one particular wav file I get this error: Traceback (most recent call last):
+ Trace 68169
pad.link(convpad)
pad added! Traceback (most recent call last):
Created attachment 65308 [details] [review] add filtered caps to make adder negotiate better negotiation in adder needs to be improved, without any help it will happily mix different sample rates and layouts as it they were the same, which results in bad noise. Attached patch makes sure adder deals with the same format on all input pads and works fine for most cases.
Thanks Wim, the caps negotiation helps with my test wav files. There is however one WAV file (http://www.wavsite.com/sounds/71781/AngelTheme.wav) which causes a gst.LinkError: <enum GST_PAD_LINK_NOFORMAT of type GstPadLinkReturn> error.
I can confirm what Jono said about the GstPadLinkReturn error. I would also like to add that for the files which work with the caps negotiation, the adder will stop working after setting the pipeline to PLAY, READY and back to PLAY again. So even though the caps work for some cases, it will only play once.
I had a simillar problem in buzztard and fixed it by adding a caps-filter behind each adder. Whenever I connect something to the adder I updated the capsfilter to enforce the best of all formats. Infront of each adder-input I have audioconversion elements. I don't think it can easily be fixed inside adder (as adder is format agnostic). I don't know if it would make sense (and is possible) to add some warnings in adder whenever it attempts to mix buffers with different caps. I'd like to close this as NOTABUG - okay?