summaryrefslogtreecommitdiffstats
path: root/firmware/target/sh
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-03-04 14:44:43 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-04 14:50:47 -0500
commitd18a5cad7f002b2f67385e57118048ea3db185a6 (patch)
tree61b8eafcf9d0197a8bc1f6c795c775f9170a4f64 /firmware/target/sh
parent534117d1e0d01b78d0ab9040e64fbd88213cd805 (diff)
downloadrockbox-d18a5cad7f002b2f67385e57118048ea3db185a6.tar.gz
rockbox-d18a5cad7f002b2f67385e57118048ea3db185a6.tar.bz2
rockbox-d18a5cad7f002b2f67385e57118048ea3db185a6.zip
Tweak paramters of mp3_play_data and callback.
Use generic void * and size_t and make mp3_play_data and its callback agree on types. Use mp3_play_callback_t instead of prototyping right in the function call (so it's not so messy to look at). Change doesn't appear to require plugin API version increment. Change-Id: Idcab2740ee316a2beb6e0a87b8f4934d9d6b3dd8
Diffstat (limited to 'firmware/target/sh')
-rw-r--r--firmware/target/sh/archos/audio-archos.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/target/sh/archos/audio-archos.c b/firmware/target/sh/archos/audio-archos.c
index 9dfcb9cb97..2c2579bec5 100644
--- a/firmware/target/sh/archos/audio-archos.c
+++ b/firmware/target/sh/archos/audio-archos.c
@@ -53,7 +53,7 @@ static bool paused; /* playback is paused */
static bool playing; /* We are playing an MP3 stream */
/* the registered callback function to ask for more mp3 data */
-static void (*callback_for_more)(unsigned char**, size_t*);
+static mp3_play_callback_t callback_for_more;
/* list of tracks in memory */
#define MAX_ID3_TAGS (1<<4) /* Must be power of 2 */
@@ -156,7 +156,7 @@ static void play_tick(void)
void DEI3(void) __attribute__((interrupt_handler));
void DEI3(void)
{
- unsigned char* start;
+ const void* start;
size_t size = 0;
if (callback_for_more != NULL)
@@ -469,9 +469,8 @@ void mp3_play_init(void)
}
#endif
-void mp3_play_data(const unsigned char* start, int size,
- void (*get_more)(unsigned char** start, size_t* size) /* callback fn */
-)
+void mp3_play_data(const void* start, size_t size,
+ mp3_play_callback_t get_more)
{
/* init DMA */
DAR3 = 0x5FFFEC3;