Rockbox

Tasklist

FS#1429 - Per file/directory cfg file loader

Attached to Project: Rockbox
Opened by Brian King (brking) - Saturday, 07 June 2003, 21:26 GMT
Last edited by Björn Stenberg (zagor) - Sunday, 20 June 2004, 08:50 GMT
Task Type Patches
Category Settings
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Attached is a patch that allows for automatically
loading of cfg like files that can be maintained on a
per directory, per mp3, or per m3u basis. The files
handled include:

1) mp3-specific, called trackname.cfo
2) m3u-specific, called playlist.cfo
3) dir-specific, called _default.cfo

I changed the extension (config override) because I
didn't want these files to show up in the file browser.
A user should never need to "play" one of these files
manually.

Some layering of cfg files is also allowed. You can
have a _default.cfo file in a given directory and a
trackname.cfo as well. The _default.cfo will get loaded
first, then the trackname.cfo will get loaded.

After playing a given song with a .cfo override file
associated with it, the settings prior to loading the
override file are restored.

One feature I didn't implement was attempting to
recurse the directory structure for a given file,
loading every _default.cfo in the path... If this is a
feature anyone wants, let me know and I can add it.

This task depends upon

Closed by  Daniel Stenberg (bagder)
Saturday, 18 March 2006, 22:42 GMT
Reason for closing:  Out of Date
Additional comments about closing:  I more up-to-date version of this approach should better use the compressed-audio buffer to store this data in so that we won\'t need disk spinups between songs to set a new config
Comment by Brian King (brking) - Sunday, 08 June 2003, 03:20 GMT

The latest patch (2) fixes a problem that when loading a
playlist, the configuration was not getting loaded properly.
It also restores the configuration when stopping the mp3
rather than waiting until the next file is selected.
Comment by Brian King (brking) - Thursday, 12 June 2003, 02:49 GMT

This patch should fix the sound settings and file settings
(eg. wps file) getting messed up when switching songs.
Comment by Steve Michelson (chilliedog) - Saturday, 14 June 2003, 18:58 GMT

Great idea, Brian.
Comment by Brian King (brking) - Saturday, 14 June 2003, 19:25 GMT

I had broken the resume function with my previous patches.
This patch (4) fixes resume.
Comment by Brian King (brking) - Wednesday, 09 July 2003, 02:01 GMT

Patch 5 is an update against the current cvs. No functional
changes.
Comment by Henrik Backe (hbacke) - Wednesday, 09 July 2003, 12:16 GMT

Your change of playlist_get_resume_info breaks the bookmark
patch. Also to me playlist_get resume_info is a query function
so I think it's not the best place to change global_settings.

Change the code in wps.c slightly instead to something like
this (hope you can find the place)

if (!playlist_get_resume_info(&global_settings.resume_index))
{
saved_settings.resume_index=global_settings.resume_index;
global_settings.resume_offset=id3->offset;
saved_settings.resume_offset = id3->offset;
settings_save();
}

Keep up the great work/Henrik
Comment by Brian King (brking) - Thursday, 10 July 2003, 02:15 GMT

Attached is a patch to fix Henrik's issue. I didn't try
applying the bookmarking patch as it was going to require a
bit of work (The patch I downloaded seemed to be a bit out
of date), but I did what you suggested. I also fixed a small
bug that prevented the patch from doing anything useful;)
Comment by Brian King (brking) - Wednesday, 01 October 2003, 02:38 GMT

Keeping current with cvs. No new features.
Comment by Brian King (brking) - Wednesday, 17 December 2003, 21:52 GMT

Attached is an update which fixes a bug in that per mp3 file
cfo files were getting loaded while the previously playing
song was still playing. It also adds a .cfg file option:
rvolume, which can be used to adjust the relative volume of
a given song by using +10 to increase volume by 10 or -10 to
decrease by 10. Documentation is now updated as well.

Loading...