FSO ringtone

Guillaume Chereau charlie at openmoko.org
Thu Aug 7 09:32:23 CEST 2008


Matt Joyce wrote:
> I don't mean to be overly critical, the process you've described is
> trivial enough, and thank you for sharing, but why is is designed like
> this?
>   
I agree with you that it is not the way we should do. For me the 
decision to start or stop the ringing tone should be left to the 
software that reacts to the incoming call signal. Then the configuration 
file should depends of the software. Fun thing to try : kill zhone on 
FSO, and call the phone, it will still ring.

But, in the framework we want to include a full customizable events 
system, that will be useful when you want to programs context rules, 
like : when I enter into my house, set profile to Silent, etc...
So the moment we use this mechanism to start and stop the ring tone. 
Maybe in the future we will move that out of the framework, but the 
events manager system will stay, because it has many other uses.
> Surely if the exact same steps are performed before building the
> software, it will be much easier for many more people.
> It just seem insane to be hardcoding references to sound files for
> functions that people will habitually want to change.
>   
Yes, that is why I say, the software should decide of the way it reacts 
to an incoming call.
> Ring tone is probably the first item of customisation a new user will
> want to change, and they will expect it to be intuitive.
>
> On another note, the rule.yaml file looks intresting, where can I find
> out more about that ?
>   
Well, it is very new, I just added this to the framework a few days ago. 
It uses the yaml syntax [0] that I like a lot . If you want to see the 
code, download the framework daemon [1], and have a look at the files in 
subsystems/oeventsd/ It is all in python and there is enough 
documentation to get the idea.
As soon as the framework team accepts this thing, I will create a 
tutorial on how to create custom rules in the freesmartphone wiki [1]

[0] http://www.yaml.org/
[1] http://git.freesmartphone.org/?p=framework.git;a=summary
[2] http://www.freesmartphone.org/index.php/Tutorials

Charlie
> Matt
>
>
> On Thu, Aug 7, 2008 at 12:53 PM, Guillaume Chereau <charlie at openmoko.org> wrote:
>   
>> Just for your information, with the new events system, it will soon be
>> different. You will have to edit the rule.yaml file. It looks like this
>> now :
>>
>> -
>>    # This rule will play a ring tone when a call is incoming
>>    trigger: CallStatus()
>>    filters: HasAttr(status, "incoming")
>>    actions:
>>        - PlaySound("/usr/share/sounds/Arkanoid_PSID.sid")
>>        - StartVibration()
>> -
>>    # This one will stop the ring tone when the call is in an other state
>>    trigger: CallStatus()
>>    filters: Not(HasAttr(status, "incoming"))
>>    actions:
>>        - StopSound("/usr/share/sounds/Arkanoid_PSID.sid")
>>        - StopVibration()
>>
>> So you will need to replace the path to the path you want.
>> Still not as good as a real user interface, but better than being
>> hard-coded in the framework code.
>>
>> Charlie
>>
>> On Thu, 2008-08-07 at 01:53 +0200, Francesco Cat wrote:
>>     
>>> add this on the wiki :D it seems nice and should be automated in a
>>> really simple way! :)
>>>
>>> 2008/8/7 Angus Ainslie <angus.ainslie at gmail.com>:
>>>       
>>>> On Wed, Aug 6, 2008 at 3:40 PM, simarillion <simarillion at gmx.de> wrote:
>>>>         
>>>>> On Wednesday 06 August 2008 20:20:29 Angus Ainslie wrote:
>>>>>           
>>>>>> Where is the FSO ring tone saved ?
>>>>>>
>>>>>> Angus
>>>>>>             
>>>>> I think it's /usr/share/sounds/
>>>>> But I'm not sure.
>>>>>           
>>>> Thanks ,
>>>>
>>>> Thats exactly where it is.
>>>>
>>>> /usr/share/sounds/Arkanoid_PSID.sid
>>>>
>>>> Now to change it is a little bit of fun.
>>>>
>>>> first in
>>>>
>>>> /usr/lib/python2.5/site-packages/framework/subsystems/oeventd/receiver.py
>>>>
>>>> Change the line that reads:
>>>>
>>>> decoder = gst.element_factory_make( "siddec", "decoder" )
>>>>
>>>> to
>>>>
>>>> decoder = gst.element_factory_make( "mad", "decoder" )
>>>>
>>>>
>>>> and change the line that reads:
>>>>
>>>> filesrc.set_property( "location", "/usr/share/sounds/Arkanoid_PSID.sid" )
>>>>
>>>> to
>>>>
>>>> filesrc.set_property( "location", "/usr/share/sounds/ringtone" )
>>>>
>>>> Then
>>>>
>>>> mv
>>>> /usr/lib/python2.5/site-packages/framework/subsystems/oeventd/receiver.pyo
>>>> /home/root
>>>>
>>>> then reboot the phone ( I'm sure there's a better way to regenerate
>>>> receiver.pyo but I don't know it )
>>>>
>>>> Now you can link /usr/share/sounds/ringtone to any mp3 and that will be your
>>>> ringtone
>>>>
>>>> Angus
>>>>
>>>>         
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>   





More information about the community mailing list