GNOME Bugzilla – Bug 396057
[audiofx] New audioinvert element
Last modified: 2007-01-23 19:23:53 UTC
Hi, attached are patches against plugins-good CVS that add a audioinvert element to audiofx, adds unit tests and docs. audioinvert swaps the upper and lower half of audio samples. There's a degree property to set the degree of inversion. 0 is passthrough, 0.5 creates silence, 1.0 gives completely inverted samples. Mixing an inverted sample on top ofthe original with a slight delay can produce effects that sound like resonance. Creating a stereo sample from a mono source, with one channel inverted produces wide-stereo sounds. The method to calculate the samples is (in the float case): sample = sample*(1-degree) + (-sample) * degree Bye
Created attachment 80172 [details] [review] audioinvert-sources.diff
Created attachment 80173 [details] [review] audioinvert-tests.diff
Created attachment 80174 [details] [review] audioinvert-docs.diff
forgot to mention, that I once removed invert from SoundFX as this is equivalent to Amplify using a negative factor. I later readded it, as it was beyond what some people could figure out. I wonder wheter having the implementation in Bug397162 is enough.
Created attachment 80578 [details] [review] audioinvert-sources.diff trivial fix for the docs
looks good, please commit!
Thanks for reviewing... commited: 2007-01-23 Sebastian Dröge <slomo@circular-chaos.org> reviewed by: Stefan Kost <ensonic@users.sf.net> * gst/audiofx/Makefile.am: * gst/audiofx/audiofx.c: (plugin_init): * gst/audiofx/audioinvert.c: (gst_audio_invert_base_init), (gst_audio_invert_class_init), (gst_audio_invert_init), (gst_audio_invert_set_property), (gst_audio_invert_get_property), (gst_audio_invert_set_caps), (gst_audio_invert_transform_int), (gst_audio_invert_transform_float), (gst_audio_invert_transform_ip): * gst/audiofx/audioinvert.h: Add new audiofx element "audioinvert". This element swaps the upper and lower half of samples and can be used for example for a wide-stereo effect. Fixes #396057 * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-good-plugins-docs.sgml: * docs/plugins/gst-plugins-good-plugins-sections.txt: * docs/plugins/gst-plugins-good-plugins.args: * docs/plugins/inspect/plugin-audiofx.xml: Add docs for the audioinvert element and add them to the build system. * tests/check/Makefile.am: * tests/check/elements/audioinvert.c: (setup_invert), (cleanup_invert), (GST_START_TEST), (invert_suite), (main): Add unit test suite for the audioinvert element.
...and now that I can close bugs really close this one :)