Requesting audio samples using gstreamer
Sayamindu Dasgupta
sayamindu at gmail.com
Mon Oct 22 02:02:03 EDT 2007
On Sun, 2007-10-21 at 12:56 +0530, Arjun Sarwal wrote:
> Is there a way to explicitly request samples from Alsa using
> gstreamer ?
>
> Currently, I set up a pipeline comprising of alsasrc and fakesink as
> the elements and have connected the handoff signal to a signal handler
> function. I've set sampling to 48Khz, 16bit, single channel. Within
> the signal handler function I get a buffer/list of 480, 16bit values
> when the handoff signal is emitted. It'd be great if I could request
> samples on the fly using gstreamer.
I'm not very sure, but would the audiotestsrc element help here ?
From
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-audiotestsrc.html
Description
AudioTestSrc can be used to generate basic audio signals. It support
several different waveforms and allows you to set the base frequency and
volume.
Example launch line
gst-launch audiotestsrc ! audioconvert ! alsasink
This pipeline produces a sine with default frequency (mid-C) and volume.
gst-launch audiotestsrc wave=2 freq=200 ! audioconvert ! tee name=t !
queue ! alsasink t. ! queue ! libvisual_lv_scope ! ffmpegcolorspace !
xvimagesink
In this example a saw wave is generated. The wave is shown using a scope
visualizer from libvisual, allowing you to visually verify that the saw
wave is correct.
Regards,
Sayamindu
--
সায়মিন্দু দাশগুপ্ত (Sayamindu Dasgupta)
http://sayamindu.randomink.org/ramblings
More information about the Devel
mailing list