summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-06-26 23:33:14 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-06-26 23:33:14 +0000
commit69e83490969e1c96d28da98f1d6ddb2705dc0acf (patch)
tree24405410c2f0b3f0348e0466be79711a2369164d
parenta72f95c2ba57c5f4764f20044d6ac1ca4be79e4e (diff)
downloadrockbox-69e83490969e1c96d28da98f1d6ddb2705dc0acf.tar.gz
rockbox-69e83490969e1c96d28da98f1d6ddb2705dc0acf.zip
Files play.c/h have been obsoleted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1212 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/play.c134
-rw-r--r--apps/play.h20
2 files changed, 0 insertions, 154 deletions
diff --git a/apps/play.c b/apps/play.c
deleted file mode 100644
index 68642cf14a..0000000000
--- a/apps/play.c
+++ /dev/null
@@ -1,134 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Daniel Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <stdio.h>
21#include <string.h>
22#include <stdlib.h>
23
24#include "file.h"
25#include "lcd.h"
26#include "button.h"
27#include "kernel.h"
28#include "tree.h"
29#include "debug.h"
30#include "sprintf.h"
31
32#include "id3.h"
33#include "mpeg.h"
34#include "settings.h"
35
36#ifdef MPEG_PLAY
37#include "mpegplay.h"
38#endif
39
40#define LINE_Y 1 /* initial line */
41
42void playtune(char *filename)
43{
44 static char mfile[256];
45 struct mp3entry mp3;
46 bool good=1;
47#ifdef HAVE_LCD_BITMAP
48 char buffer[256];
49#endif
50
51 if(mp3info(&mp3, filename)) {
52 DEBUGF("id3 failure!");
53 good=0;
54 }
55 lcd_clear_display();
56#ifdef HAVE_LCD_BITMAP
57 lcd_setmargins(0,0);
58 lcd_setfont(0);
59#endif
60
61 if(!good) {
62 lcd_puts(0, 0, "[no id3 info]");
63 }
64 else {
65#ifdef HAVE_LCD_BITMAP
66 lcd_puts(0, 0, "[id3 info]");
67 lcd_puts(0, LINE_Y, mp3.title?mp3.title:"");
68 lcd_puts(0, LINE_Y+1, mp3.album?mp3.album:"");
69 lcd_puts(0, LINE_Y+2, mp3.artist?mp3.artist:"");
70
71 snprintf(buffer,sizeof(buffer), "%d ms", mp3.length);
72 lcd_puts(0, LINE_Y+3, buffer);
73
74 snprintf(buffer,sizeof(buffer), "%d kbits", mp3.bitrate);
75 lcd_puts(0, LINE_Y+4, buffer);
76
77 snprintf(buffer,sizeof(buffer), "%d Hz", mp3.frequency);
78 lcd_puts(0, LINE_Y+5, buffer);
79#else
80 lcd_puts(0, 0, mp3.artist?mp3.artist:"<no artist>");
81 lcd_puts(0, 1, mp3.title?mp3.title:"<no title>");
82#endif
83 }
84
85#ifdef HAVE_LCD_BITMAP
86 lcd_update();
87#endif
88
89 strncpy(mfile, filename, 256);
90 mpeg_play(mfile);
91
92 while(1) {
93 switch ( button_get(true) ) {
94#ifdef HAVE_RECORDER_KEYPAD
95 case BUTTON_UP:
96 global_settings.volume += 2;
97 if(global_settings.volume > 100)
98 global_settings.volume = 100;
99 mpeg_volume(global_settings.volume);
100 break;
101
102 case BUTTON_DOWN:
103 global_settings.volume -= 2;
104 if(global_settings.volume < 0)
105 global_settings.volume = 0;
106 mpeg_volume(global_settings.volume);
107 break;
108
109 case BUTTON_OFF:
110 case BUTTON_LEFT:
111 return;
112 break;
113#else
114 case BUTTON_RIGHT:
115 global_settings.volume += 2;
116 if(global_settings.volume > 100)
117 global_settings.volume = 100;
118 mpeg_volume(global_settings.volume);
119 break;
120
121 case BUTTON_LEFT:
122 global_settings.volume -= 2;
123 if(global_settings.volume < 0)
124 global_settings.volume = 0;
125 mpeg_volume(global_settings.volume);
126 break;
127
128 case BUTTON_STOP:
129#endif
130 return;
131 break;
132 }
133 }
134}
diff --git a/apps/play.h b/apps/play.h
deleted file mode 100644
index a8e68a61b6..0000000000
--- a/apps/play.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Daniel Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20void playtune(char *filename);