Ringtone volume and latency

Neil Jerram neiljerram at googlemail.com
Sat Jan 2 02:24:43 CET 2010


In the survey thread, a couple of responses mentioned missing calls
because of ringtone problems - which I take to be either volume too
low, or too much latency, or both.  Here are some thoughts on that.

1) In case this isn't already well known...  FSO actually does nothing
at all with the "volume" setting that you can set in SHR settings, or
Paroli, or in general via the preferences interface.  The only
relevant code is:

oeventsd/fso_actions.py:        self.audio_action = AudioAction(
self.sound_path, self.loop, self.length ) if self.volume != 0 else
None

In other words, all non-zero volume values are equivalent.

2) I tried to measure startup latency by using `time', for various
ways of playing a 9.3s Ogg clip and an equivalent .wav file:

=========================
debian-gta02:/usr/share/sounds# time mplayer kayleigh.ogg
A:   9.0 (08.9) of 9.3 (09.2) 40.1%
real	0m12.242s

debian-gta02:/usr/share/sounds# time play kayleigh.ogg
  Duration: 00:00:09.29  Title: Kayleigh
real	0m10.680s

debian-gta02:/usr/share/sounds# time play kayleigh.ogg
  Duration: 00:00:09.29  Title: Kayleigh
real	0m10.015s

debian-gta02:/usr/share/sounds# time play kayleigh.wav
  Duration: 00:00:09.29
real	0m9.652s

debian-gta02:/usr/share/sounds# time play kayleigh.wav
  Duration: 00:00:09.29
real	0m9.951s

debian-gta02:/usr/share/sounds# time gst-launch filesrc
location=/usr/share/sounds/kayleigh.ogg ! oggdemux ! vorbisdec !
audioconvert ! alsasink
Execution ended after 9384127000 ns.
real	0m11.881s

debian-gta02:/usr/share/sounds# time aplay kayleigh.wav
Playing WAVE 'kayleigh.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
real	0m9.709s
=========================

There's nothing conclusive here, because I didn't repeat the tests
enough times yet; but it looks like there's an additional latency of
at least 0.5-1s associated with playing an .ogg instead of a .wav, and
rather more than that with gst-launch.

This and the volume issue suggest to me that it would be better for
FSO only to handle plain audio data, and to play it (i.e. when an
incoming call or message comes) using the most lowlevel method (such
as aplay).  An external settings application could handle conversion
from the user's sound file to .wav, and as part of that could allow
the user to adjust the volume and preview the ringtone.

Comments?  Is there a reason why the complexity (and latency) of
handling multiple sound formats should be _inside_ FSO?

Regards,
        Neil



More information about the community mailing list