summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-06-13 15:35:07 +0000
committerNils Wallménius <nils@rockbox.org>2007-06-13 15:35:07 +0000
commitc7f9ca4067f26ba3d0471d50ed3f06b047171b50 (patch)
tree9bfaf2d5019c075ad97540a2beed8d68277ca021 /apps/playback.c
parentf50bd1151a65b1aeefaeab545187fba29881b800 (diff)
downloadrockbox-c7f9ca4067f26ba3d0471d50ed3f06b047171b50.tar.gz
rockbox-c7f9ca4067f26ba3d0471d50ed3f06b047171b50.zip
Accept FS#7264 'Build with -Os switch for coldfire targets'.
Introduces MEM_FUNCTION_WRAPPERS(api) macro which adds wrappers functions to a plugin to make plugins link correctly when gcc calls mem* functions directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13625 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/playback.c b/apps/playback.c
index ca88b5f5e3..329e8b856b 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -332,7 +332,7 @@ static struct mutex mutex_codecthread NOCACHEBSS_ATTR;
332static volatile bool voice_thread_start = false; /* Triggers voice playback (A/V) */ 332static volatile bool voice_thread_start = false; /* Triggers voice playback (A/V) */
333static volatile bool voice_is_playing NOCACHEBSS_ATTR = false; /* Is voice currently playing? (V) */ 333static volatile bool voice_is_playing NOCACHEBSS_ATTR = false; /* Is voice currently playing? (V) */
334static volatile bool voice_codec_loaded NOCACHEBSS_ATTR = false; /* Is voice codec loaded (V/A-) */ 334static volatile bool voice_codec_loaded NOCACHEBSS_ATTR = false; /* Is voice codec loaded (V/A-) */
335static char *voicebuf = NULL; 335static unsigned char *voicebuf = NULL;
336static size_t voice_remaining = 0; 336static size_t voice_remaining = 0;
337 337
338#ifdef IRAM_STEAL 338#ifdef IRAM_STEAL
@@ -340,12 +340,12 @@ static size_t voice_remaining = 0;
340static bool voice_iram_stolen = false; 340static bool voice_iram_stolen = false;
341#endif 341#endif
342 342
343static void (*voice_getmore)(unsigned char** start, int* size) = NULL; 343static void (*voice_getmore)(unsigned char** start, size_t* size) = NULL;
344 344
345struct voice_info { 345struct voice_info {
346 void (*callback)(unsigned char **start, int *size); 346 void (*callback)(unsigned char **start, size_t* size);
347 int size; 347 size_t size;
348 char *buf; 348 unsigned char *buf;
349}; 349};
350static void voice_thread(void); 350static void voice_thread(void);
351static void voice_stop(void); 351static void voice_stop(void);
@@ -355,12 +355,12 @@ static void voice_stop(void);
355/* --- External interfaces --- */ 355/* --- External interfaces --- */
356 356
357void mp3_play_data(const unsigned char* start, int size, 357void mp3_play_data(const unsigned char* start, int size,
358 void (*get_more)(unsigned char** start, int* size)) 358 void (*get_more)(unsigned char** start, size_t* size))
359{ 359{
360#ifdef PLAYBACK_VOICE 360#ifdef PLAYBACK_VOICE
361 static struct voice_info voice_clip; 361 static struct voice_info voice_clip;
362 voice_clip.callback = get_more; 362 voice_clip.callback = get_more;
363 voice_clip.buf = (char *)start; 363 voice_clip.buf = (unsigned char*)start;
364 voice_clip.size = size; 364 voice_clip.size = size;
365 LOGFQUEUE("mp3 > voice Q_VOICE_STOP"); 365 LOGFQUEUE("mp3 > voice Q_VOICE_STOP");
366 queue_post(&voice_queue, Q_VOICE_STOP, 0); 366 queue_post(&voice_queue, Q_VOICE_STOP, 0);
@@ -1238,7 +1238,7 @@ voice_play_clip:
1238 if (voice_remaining == 0 || voicebuf == NULL) 1238 if (voice_remaining == 0 || voicebuf == NULL)
1239 { 1239 {
1240 if (voice_getmore) 1240 if (voice_getmore)
1241 voice_getmore((unsigned char **)&voicebuf, (int *)&voice_remaining); 1241 voice_getmore((unsigned char **)&voicebuf, &voice_remaining);
1242 1242
1243 /* If this clip is done */ 1243 /* If this clip is done */
1244 if (voice_remaining == 0) 1244 if (voice_remaining == 0)