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. -- Jeffrey Barish ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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. > 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. Stefan ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
2008/6/5 Stefan Kost <[hidden email]>:
> 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, [hidden email] Powered by http://movial.fi Interesting stuff at http://syslog.movial.fi ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Kalle Vahlman wrote:
> 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. This code looks interesting, but I'm not getting it -- in part, perhaps, because I am actually coding in Python. 1. If we're not on maemo, then we're in the else clause. You say that playbin really only has the range of 0.0 - 1.0, so I presume that self->priv->volume has the range 0.0 - 1.0. In the maemo case, you say that the playbin uses the range 0.0 - 10.0. The volume variable presumably refers to something different from self->priv->volume, but it's hard to imagine why you would have to divide it by 10.0 rather than multiplying it by 10.0. In any case, I had already tried multiplying by 8.0 (I just picked a number out of a hat) and found that the sound was distorted. To be precise, I created a playbin with player = gst.element_factory_make('playbin', 'player') and then set its volume with player.set_property('volume', 8.0 * v) The sound does get louder, but it's distorted. 2. I don't know GStreamer well enough to fully understand what you're doing in the gst_bin_get_by_name. I tried player.get_by_name('volume') but got None. I assume that this code addresses your second bullet item: playbin sets the volume element volume to 0.0 so you are setting it to 1.0. So there is a volume element volume that is different from the playbin volume? If it really is a separate volume control, why am I getting any output if its value is set to 0 by default? -- Jeffrey Barish ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |