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 754450 - audiotestsrc: remove frequency and channel number limit
audiotestsrc: remove frequency and channel number limit
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal enhancement
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-02 12:11 UTC by Christian Leichsenring
Modified: 2015-11-02 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch implementing the changes. (2.54 KB, patch)
2015-09-02 12:11 UTC, Christian Leichsenring
none Details | Review

Description Christian Leichsenring 2015-09-02 12:11:07 UTC
Created attachment 310487 [details] [review]
The patch implementing the changes.

As discussed on http://gstreamer-devel.966125.n4.nabble.com/Ultrasound-and-audiotestsrc-tt4673383.html the limitation of generated frequencies to the audible range is not really necessary and there are use cases where it might be desirable to be able to produce ultrasound. Furthermore, the restriction to mono and stereo signals is also a needless limitation.

I therefore created a patch that lifts both these limitations while also extending the caps negotiation code to make sure that the sample rate is always at least four times as high as the frequency that ought to be generated. The reasons for this not being twice the frequency were mentioned on the list but mainly boil down to avoiding artifacts or digital silence being generated with certain wave forms at or close to the Nyquist frequency with existing code.
Comment 1 Christian Leichsenring 2015-09-20 07:53:05 UTC
I'm seeing some strange crackling artifacts with this patch so I would recommend not applying it to master right now. I will keep you posted as I learn more.
Comment 2 Wim Taymans 2015-11-02 15:03:03 UTC
commit bd89f2430bd34f57808f3cf67185db1b647ad128
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Mon Nov 2 15:54:19 2015 +0100

    audiotestsrc: increase freq limit
    
    Raise the frequency limit and try to negotiate to a samplerate of 4*freq
    when larger then the default samplerate.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=754450
Comment 3 Wim Taymans 2015-11-02 15:42:03 UTC
There was no need to convert the rate to double and back to multiple by 4. Also we need a channel-mask when dealing with channels > 2. I pushed a slightly  modified patch, thanks for the inspiration :)