1
0
Fork 0
forked from len0rd/rockbox

Changed prototype of playtune

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@926 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-06-10 07:58:04 +00:00
parent 6229aa2e6f
commit d044f5575f
3 changed files with 8 additions and 7 deletions

View file

@ -38,15 +38,16 @@
#define LINE_Y 1 /* initial line */ #define LINE_Y 1 /* initial line */
void playtune(char *dir, char *file) void playtune(char *filename)
{ {
static char mfile[256]; static char mfile[256];
char buffer[256];
mp3entry mp3; mp3entry mp3;
bool good=1; bool good=1;
#ifdef HAVE_LCD_BITMAP
char buffer[256];
#endif
snprintf(buffer, sizeof(buffer), "%s/%s", dir, file); if(mp3info(&mp3, filename)) {
if(mp3info(&mp3, buffer)) {
DEBUGF("id3 failure!"); DEBUGF("id3 failure!");
good=0; good=0;
} }
@ -84,7 +85,7 @@ void playtune(char *dir, char *file)
lcd_update(); lcd_update();
#endif #endif
snprintf(mfile, sizeof(mfile), "%s/%s", dir, file); strncpy(mfile, filename, 256);
mpeg_play(mfile); mpeg_play(mfile);
while(1) { while(1) {

View file

@ -17,4 +17,4 @@
* *
****************************************************************************/ ****************************************************************************/
void playtune(char *dir, char *file); void playtune(char *filename);

View file

@ -310,7 +310,7 @@ bool dirbrowse(char *root)
else { else {
playing = 1; playing = 1;
playtune(currdir, dircacheptr[dircursor+start]->name); playtune(buf);
playing = 0; playing = 0;
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
lcd_setmargins(0, MARGIN_Y); lcd_setmargins(0, MARGIN_Y);