[gst-devel] Please help with spectrum analyzer

Marcin Lewandowski lists at saepia.net
Sun May 29 10:50:21 CEST 2005


Hi,

I'm average experienced C programmer, and I'm new with gstreamer. I've
read documents on gstreamer's website.

I'm trying to make a spectrum analyzer for an ogg song actually played
with my program. So I took gtk sample from spectrum plugin and second
sample - for ogg player (from documentation) and I tried to "mix" it.
Result of my work is available here:

http://saepia.net/temp/gstreamer/gst2.c

This is not making any sound - because output is fakesink, but it can
demonstrate my problem: there are no matter, whether I'm using
alsa-connected microphone or ogg soundfile, my spectrum always looks
similar to that:

http://saepia.net/temp/gstreamer/gst2.png

Left half of spectrum are always low, right are always high. Bars are
moving but it doesn't looks as it should. Only source which generates
proper result is silence - when using it, bars are always on 0 position.

This is major problem, because it exists on every sound source which
I've tried. Firstly, I've tried to make small change on the example
derived with spectrum plugin - I've only changed oss source to alsa
source, and result is similar, too :(

Second is that I don't know, how to create spectrum analyzer with
simultaneous playback. AFAIK, fakesrc makes no sound, but has event
which could be used by spectrum plugin. alsasink doesn't have that
event. This is minor problem (or maybe: not minor, but without solution
for earlier one even if I can playback it means nothing for me because I
still don't have spectrum analyzer), but if somebody could solve it too,
I would be really appreciated.

My system is gentoo linux (2.6.11-ck3). I have gstreamer-0.8.8. There
are few apps on my system which succesfully uses gstreamer.

Thanks in advance,

-- 
Marcin Lewandowski
lists at saepia.net





More information about the gstreamer-devel mailing list