|
Rockbox mail archiveSubject: Wps - matter of opinion patch ;-)Wps - matter of opinion patch ;-)
From: Mats Lidell <matsl_at_contactor.se>
Date: Thu, 08 Aug 2002 13:35:11 +0200 Hi, Here is yet another wps patch. (For the player.) Why? I think the default should be changed to use id3 info and display the playing time, postion in playlist (index) and the total of songs in the playlist (amount). All of this is of course a matter of opinion. There has been other patches for the wps that provides similar functionality. I think that all of these could be merged to provide a better default. Ideas that I like in these other patches are the use an automatic fallback to disk information if there are no id3 info and a more rapid update of the display so that the time update display more nicely. I could merge all this into one patch but that seems to me to start a matter-of-opinion-wps-patch-war. Who with CVS access would want to try all these patches anyway? As an extra functionality, for discussion, I have changed the display when the song is paused. It displays the total playing time for the song instead of the actual time played. (I got this idea while experimenting with two scrolling lines where the second line contains most of the id3 information not present in the first line. I think that is worth testing when we have the possibility to scroll both lines. With only one scrolling line I limit the change to just the total playing time.) There are problems with this patch also. I'm not sure how the size of the buffer matters. (Used to produce the first long scroll line) With a smaller size I got errors. It should be large enough to take song, artist and album and I havent checked the size limits for the id3-tags so I just set it to 256 and hope for the best. Not a good solution. Many songs or long playing time isn't accounted for either. Any way this is a discussion entry with a patch since functional pathes instead of discussion only has been requested. Yours Index: wps.c =================================================================== RCS file: /cvsroot/rockbox/apps/wps.c,v retrieving revision 1.50 diff -u -c -r1.50 wps.c *** wps.c 8 Aug 2002 05:56:34 -0000 1.50 --- wps.c 8 Aug 2002 10:48:33 -0000 *************** *** 148,156 **** lcd_puts(0, l++, buffer); } #else ! ! lcd_puts(0, l++, id3->artist?id3->artist:"<no artist>"); ! lcd_puts_scroll(0, l++, id3->title?id3->title:"<no title>"); #endif break; } --- 148,161 ---- lcd_puts(0, l++, buffer); } #else ! char buffer[256]; ! ! snprintf(buffer, sizeof(buffer), "%s ~ %s ~ %s", ! id3->title?id3->title:"<no title>", ! id3->artist?id3->artist:"<no artist>", ! id3->album?id3->album:"<no album>" ! ); ! lcd_puts_scroll(0, l++, buffer); #endif break; } *************** *** 475,488 **** /* Display time with the filename scroll only because the screen has room. */ if (global_settings.wps_display == ! PLAY_DISPLAY_FILENAME_SCROLL) { ! snprintf(buffer,sizeof(buffer), "%d:%02d/%d:%02d ", id3->elapsed / 60000, ! id3->elapsed % 60000 / 1000, ! id3->length / 60000, ! id3->length % 60000 / 1000 ); lcd_puts(0, 1, buffer); lcd_update(); } --- 480,509 ---- /* Display time with the filename scroll only because the screen has room. */ if (global_settings.wps_display == ! PLAY_DISPLAY_FILENAME_SCROLL || ! global_settings.wps_display == PLAY_DISPLAY_DEFAULT) { ! snprintf(buffer,sizeof(buffer), "%02d/%02d %02d:%02d", ! playlist.index + 1, ! playlist.amount, id3->elapsed / 60000, ! id3->elapsed % 60000 / 1000); + lcd_puts(0, 1, buffer); + lcd_update(); + } + #endif + } else if (id3) { + #ifdef HAVE_LCD_BITMAP + #else + if (global_settings.wps_display == PLAY_DISPLAY_FILENAME_SCROLL || + global_settings.wps_display == PLAY_DISPLAY_DEFAULT) + { + snprintf(buffer,sizeof(buffer), "%02d/%02d %02d:%02d", + playlist.index + 1, + playlist.amount, + id3->length / 60000, + id3->length % 60000 / 1000); lcd_puts(0, 1, buffer); lcd_update(); } Yours -- %% MatsReceived on 2002-08-08 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |