Thread Tools
Posts: 29 | Thanked: 7 times | Joined on May 2010 @ Frankfurt, Germany

I'm currently trying to come up with a solution for individual ringtones by caller following the ideas from this thread. I am, however, a bit stumped at the moment trying to find out how ringtone caching is handled on the N900. Since I haven't found any documentation on this, I had to experiment. This is what I have so far:
  • (MP3-)Ringtones are cached as .wav files in /home/user/.local/share/sounds
  • This seems to happen the first time a ringtone is played. The information about the cached ringtone is stored somewhere and the ringtone is only cached again when a new ringtone is set, not when the original one changes (e.g. by changing a symlink)

This leads to the following behaviour: If I set the ringtone to '/home/user/link', which in turn is a symlink to '/home/user/MyDocs/.sounds/sound.mp3', at first nothing happens. The first time the sound is played, a cached version '/home/user/.local/share/sounds/sound.mp3.wav' is created. This is the played on all subsequent calls, even if I change the symlink to point to another sound file, e.g. '/home/user/MyDocs/.sounds/other.mp3'.

I have the following questions:
  • Can anybody confirm this behaviour?
  • Is this documented anywhere?
  • Where is the information about the existence of the cached ringtone and which ringtone to play stored?

An additional question would be what happens to ringtones that are originally in .wav format. I can probably fnd that out myself by experimenting, but haven't had the time yet, so if anybody already knows I'd be grateful for any hints.

Any help on this would be highly appreciated. Thanks a lot in advance!

P.S. I posted this in 'Development' rather than in 'N900' since the latter is for hardware-specific discussion and since I thought developers would be most likely to be able to shed some light on this. If anybody feels this belongs somewhere else, feel free to move this thread.
fcrochik's Avatar
Posts: 722 | Thanked: 1,222 times | Joined on Apr 2010 @ USA
I believe you are mostly right after my tests. The only thing I would like to point out is that the wav file is actually created imediately after you change the ringtone (it seems that changing the ringtone either on the settings or using dbus will trigger a background process that will convert the file into a wav file)
The big chalenge is that you dont have how to know about the wav file converted and stored on the "cache" folder. The dbus get_value call will return the original file location but the phone will use the cached file.
It seems that you just have to assume there will be a file on the cache folder and guess the name based on the "official" file returned by dbus.
Like you I haven't tested yet what happens if you assign a wav file. I hope it will copy the file to the cache folder as well....

My maemo work:
For Harmattan:
GeePS - native UI around google maps - GApp - access to optimized mobile "google apps".
Shutdown - shutdown and reboot with one click - QuickCall - one click call, skypeout and google voice integration using dial tones.
WakeOnLan - wake computers on your local network.
For Maemo/N900:
GApp - access to optimized mobile "google apps". - MobWebMail: browser optimized to access multiple gmail accounts
MyContacts: 75 Contacts on your desktop, ring tones per group and more - GeePS: native front-end for google maps
Macuco2 : web browser to access web sites optimized for the iphone - WakeOnLan: wake up computers on your local network
dbBrowser: Simple application to browse sqlite databases

The Following User Says Thank You to fcrochik For This Useful Post:
Posts: 94 | Thanked: 253 times | Joined on Jan 2010 @ Virginia
I spent quite some time on this for my post

I found when you set the ringtone it creates a cache only if the cache doesn't already exist. Also it seems to recreate the cache on boot-up

Thread Tools

Forum Jump

All times are GMT -4. The time now is 09:19 AM.