summaryrefslogtreecommitdiffstats
path: root/firmware/target/sh/archos/audio-archos.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/sh/archos/audio-archos.c')
-rw-r--r--firmware/target/sh/archos/audio-archos.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/firmware/target/sh/archos/audio-archos.c b/firmware/target/sh/archos/audio-archos.c
index e2d8b6f157..9dfcb9cb97 100644
--- a/firmware/target/sh/archos/audio-archos.c
+++ b/firmware/target/sh/archos/audio-archos.c
@@ -52,10 +52,6 @@ extern unsigned shadow_codec_reg0;
static bool paused; /* playback is paused */
static bool playing; /* We are playing an MP3 stream */
-/* for measuring the play time */
-static long playstart_tick;
-static long cumulative_ticks;
-
/* the registered callback function to ask for more mp3 data */
static void (*callback_for_more)(unsigned char**, size_t*);
@@ -461,6 +457,7 @@ void mp3_shutdown(void)
/* new functions, to be exported to plugin API */
+#if CONFIG_CODEC == MAS3587F
void mp3_play_init(void)
{
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
@@ -469,8 +466,8 @@ void mp3_play_init(void)
playing = false;
paused = true;
callback_for_more = NULL;
- mp3_reset_playtime();
}
+#endif
void mp3_play_data(const unsigned char* start, int size,
void (*get_more)(unsigned char** start, size_t* size) /* callback fn */
@@ -503,13 +500,11 @@ void mp3_play_pause(bool play)
{ /* resume playback */
SCR0 |= 0x80;
paused = false;
- playstart_tick = current_tick;
}
else if (!paused && !play)
{ /* stop playback */
SCR0 &= 0x7f;
paused = true;
- cumulative_ticks += current_tick - playstart_tick;
}
}
@@ -536,20 +531,6 @@ void mp3_play_stop(void)
#endif
}
-long mp3_get_playtime(void)
-{
- if (paused)
- return cumulative_ticks;
- else
- return cumulative_ticks + current_tick - playstart_tick;
-}
-
-void mp3_reset_playtime(void)
-{
- cumulative_ticks = 0;
- playstart_tick = current_tick;
-}
-
bool mp3_is_playing(void)
{
return playing;