[gst-devel] Quiet output from playbin on maemo

Kalle Vahlman kalle.vahlman at gmail.com
Thu Jun 5 16:13:00 CEST 2008


2008/6/5 Stefan Kost <ensonic at hora-obscura.de>:
> hi,
>
> Jeffrey Barish schrieb:
>> I have been using playbin to output ogg files on Linux and Windows
>> platforms.  Recently, I tried moving the code to maemo (Nokia N800).  I get
>> an output, but it's very quiet.  When I multiply the playbin volume
>> parameter by 8, the volume is about normal, but then the signal is
>> distorted.  Is there another parameter that could be affecting loudness
>> (e.g., pan)?  Where can I find a list of parameters?  Is there some other
>> way to account for the problem?  Does anyone happen to know of an N800
>> application that uses playbin?  Other applications I have tested on the
>> platform (e.g., Media player) do produce an output at a normal loudness.
>>
> that would indicate that the alsasink/dsppcmsink volume is too low. Its
> not in the gstreamer side og things. I would recommend to check on
> maemo-devel list too to se if someone has already found out.

We had this problem in kilikali and fixed it with the following code
(not sure if it's valid but it's based on empirical testing and
results and seems to work so...):

#ifdef MAEMO_CHANGES
  /* Ok, here are the rules that seem to be in effect:
  *  - standard playbin really only has the range 0.0...1.0 since anything
  *    over 1.0 starts to distort the sound
  *  - maemo playbin seems to set the volume element volume to 0.0, dunno why
  *  - maemo playbin uses the whole 0.0...10.0 range to control the dsp sink
  *
  * So in principle you could adjust volume the same way everywhere but
  * you just won't like the result (1/10th of max volume) on maemo.
  *
  * So we hack around, as usual.
  */
  g_object_set (G_OBJECT(self->audiobin), "volume",
                (gdouble)(1.0*volume/10.0), NULL);

  {
    GstElement *sink = gst_bin_get_by_name(GST_BIN(self->audiobin), "volume");
    if (sink != NULL)
    {
      g_object_set (G_OBJECT(sink), "volume", 1.0, NULL);
    }
  }
#else
  g_object_set (G_OBJECT(self->audiobin), "volume",
                self->priv->volume, NULL);
#endif

The dsp sinks I believe have their own volume setting so the funky
behaviour might be caused by that but I don't know.

-- 
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi




More information about the gstreamer-devel mailing list