Thread: FlipClock Beta
View Single Post
Posts: 631 | Thanked: 837 times | Joined on May 2007 @ Milton, Ontario, Canada
#291
Jolouis, maybe a refinement on the default folder that contains our sound files. In the "Set Alarms" screen, "Mode" is set for "Sound", "Loop" is enabled, and I have already selected "Song.mp3" from the "Sounds" folder on my external memory card. Once I do this, it should remember that default folder so everytime I click on "Alarm Sound" the contents of that folder is displayed. Many times it reverts back to the internal flash which is where our applications are stored.
Once you've selected a sound, if you go to change that sound it will already be pointing at the folder that contained the previous sound file. The only time it will revert to the "default folder" is if no sound was previously selected. I guess I could tweak it so that if the current alarm doesn't have a sound associated with it, when you browse for a file it reverts to the directory of an alarm that does have a sound file... it might seem a bit strange if your files are all over the place, but okay I can do that..

I noticed you forgot to seed the random number generator, so although the tracks are chosen at random, you get the same tracks every time flip clock starts.
Perhaps adding this somewhere:

#include <time.h>

srand( (unsigned)time(NULL) );
Yea thanks! I noticed that this morning when I did some more testing and had added the code you posted above immediately before the random call so that it's always "more random"! ;-)
 

The Following User Says Thank You to jolouis For This Useful Post: