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 460422 - [audiotestsrc] Add support for float and double output
[audiotestsrc] Add support for float and double output
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.14
Other Linux
: Normal normal
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-26 01:24 UTC by Sebastian Dröge (slomo)
Modified: 2007-08-03 19:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
audiotestsrc.diff (18.18 KB, patch)
2007-07-26 01:25 UTC, Sebastian Dröge (slomo)
none Details | Review
audiotestsrc.diff (18.17 KB, patch)
2007-07-27 13:01 UTC, Sebastian Dröge (slomo)
reviewed Details | Review
audiotestsrc.diff (19.92 KB, patch)
2007-08-02 19:24 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2007-07-26 01:24:44 UTC
Hi,
the attached patch adds support for float and double output in audiotestsrc. Apart from weird clipping with
audiotestsrc ! audioconvert ! alsasink

everything seems to be fine.

Not sure what the clipping causes, when writing the sound to a file all samples look fine (but are going over the full range of possible values instead of keeping a bit space around the borders). Lowering the volume of audiotestsrc also helps, output to int16 and then converting to int32 works too... so no idea :/
Using osssink instead does work too so maybe alsa simply can't cope with values going over the complete 32 bit range?

Bye
Comment 1 Sebastian Dröge (slomo) 2007-07-26 01:25:08 UTC
Created attachment 92426 [details] [review]
audiotestsrc.diff
Comment 2 Sebastian Dröge (slomo) 2007-07-27 13:01:56 UTC
Created attachment 92544 [details] [review]
audiotestsrc.diff

small bugfix for white noise
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-02 14:17:31 UTC
looks quite good, I would like to see symbolic names for format. That looks like a candidate for gst-plugin-base/gst-libs/gst/audio.
Comment 4 Sebastian Dröge (slomo) 2007-08-02 19:24:49 UTC
Created attachment 92943 [details] [review]
audiotestsrc.diff

this now uses an enum for the format, adds int32 support and sets the volume property to the default of the GParamSpec instead of 1.0. The latter change fixes the clipping I noticed and it should be ready to commit.

Well, for the enum in libgstaudio: we already have GstRingBufferSpec and GstBufferFormat but that's not really usable here because I use the enum for indexing in a function table.
Comment 5 Sebastian Dröge (slomo) 2007-08-03 19:51:53 UTC
  2007-08-03  Sebastian Dröge  <slomo@circular-chaos.org>

       * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init),
       (gst_audio_test_src_src_fixate), (gst_audio_test_src_setcaps),
       (gst_audio_test_src_init_sine_table),
       (gst_audio_test_src_change_wave), (gst_audio_test_src_create):
       * gst/audiotestsrc/gstaudiotestsrc.h:
       Add float/double and int32 support to audiotestsrc. Fixes #460422.
       Also set the default volume to the default value specified in the
       GParamSpec.