summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-05-16 14:48:53 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-05-16 14:48:53 +0000
commita39f566a7f5959d8a85663f0ceccfd468e67af50 (patch)
treef0aff264eccdbc86d34e9c17583a34781aa796d1 /uisimulator
parent244688e5c2b990393b5e309abfd1f9bf0e379636 (diff)
downloadrockbox-a39f566a7f5959d8a85663f0ceccfd468e67af50.tar.gz
rockbox-a39f566a7f5959d8a85663f0ceccfd468e67af50.zip
Moved play.* to apps/
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@600 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/play.c102
-rw-r--r--uisimulator/play.h20
2 files changed, 0 insertions, 122 deletions
diff --git a/uisimulator/play.c b/uisimulator/play.c
deleted file mode 100644
index e93f17672e..0000000000
--- a/uisimulator/play.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2002 Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "file.h"
-#include "lcd.h"
-#include "button.h"
-#include "kernel.h"
-#include "tree.h"
-#include "debug.h"
-
-#include "id3.h"
-
-#ifdef MPEG_PLAY
-#include "common/mpegplay.h"
-#endif
-
-#define LINE_Y 1 /* initial line */
-
-void playtune(char *dir, char *file)
-{
- char buffer[256];
- int fd;
- mp3entry mp3;
- bool good=1;
-
- sprintf(buffer, "%s/%s", dir, file);
-
- if(mp3info(&mp3, buffer)) {
- DEBUGF("id3 failure!");
- good=0;
- }
- lcd_clear_display();
-#ifdef HAVE_LCD_BITMAP
- lcd_setmargins(0,0);
- lcd_setfont(0);
-#endif
-
- if(!good) {
- lcd_puts(0, 0, "[no id3 info]");
- }
- else {
-#ifdef HAVE_LCD_BITMAP
- lcd_puts(0, 0, "[id3 info]");
- lcd_puts(0, LINE_Y, mp3.title?mp3.title:"");
- lcd_puts(0, LINE_Y+1, mp3.album?mp3.album:"");
- lcd_puts(0, LINE_Y+2, mp3.artist?mp3.artist:"");
-
- sprintf(buffer, "%d ms", mp3.length);
- lcd_puts(0, LINE_Y+3, buffer);
-
- sprintf(buffer, "%d kbits", mp3.bitrate);
- lcd_puts(0, LINE_Y+4, buffer);
-
- sprintf(buffer, "%d Hz", mp3.frequency);
- lcd_puts(0, LINE_Y+5, buffer);
-#else
- lcd_puts(0, 0, mp3.artist?mp3.artist:"<no artist>");
- lcd_puts(0, 1, mp3.title?mp3.title:"<no title>");
-#endif
- }
- lcd_update();
-
-#ifdef MPEG_PLAY
- sprintf(buffer, "%s/%s", dir, file);
- mpeg_play(buffer);
- return;
-#endif
-
- while(1) {
- int key = button_get();
-
- if(!key) {
- sleep(30);
- continue;
- }
- switch(key) {
- case BUTTON_OFF:
- case BUTTON_LEFT:
- return;
- break;
- }
- }
-}
diff --git a/uisimulator/play.h b/uisimulator/play.h
deleted file mode 100644
index b63df29c82..0000000000
--- a/uisimulator/play.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2002 Daniel Stenberg
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-void playtune(char *dir, char *file);