diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-11-07 09:28:07 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-11-07 09:28:07 +0000 |
commit | c14430a9c198c261990ceff77bdfa0856ebcf5fe (patch) | |
tree | 04f4f2b479093630c7acde360c0d59de55f8710f | |
parent | 51b75d5d3def842cdcf02576eb963a494e26b1b1 (diff) | |
download | rockbox-c14430a9c198c261990ceff77bdfa0856ebcf5fe.tar.gz rockbox-c14430a9c198c261990ceff77bdfa0856ebcf5fe.zip |
compile talk.c on hwcodec sim. it wont actually talk though
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15512 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/SOURCES | 2 | ||||
-rw-r--r-- | apps/screens.c | 4 | ||||
-rw-r--r-- | apps/talk.c | 5 | ||||
-rw-r--r-- | apps/talk.h | 14 | ||||
-rw-r--r-- | firmware/mp3_playback.c | 21 | ||||
-rw-r--r-- | uisimulator/common/stubs.c | 47 |
6 files changed, 26 insertions, 67 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index dc5b987b61..d50da979ad 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -36,9 +36,7 @@ settings.c | |||
36 | settings_list.c | 36 | settings_list.c |
37 | status.c | 37 | status.c |
38 | cuesheet.c | 38 | cuesheet.c |
39 | #if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC | ||
40 | talk.c | 39 | talk.c |
41 | #endif | ||
42 | tree.c | 40 | tree.c |
43 | #ifdef HAVE_TAGCACHE | 41 | #ifdef HAVE_TAGCACHE |
44 | tagtree.c | 42 | tagtree.c |
diff --git a/apps/screens.c b/apps/screens.c index ecd989043b..642d523c1d 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -1286,14 +1286,12 @@ static char* runtime_get_data(int selected_item, void* data, char* buffer) | |||
1286 | 1286 | ||
1287 | static int runtime_speak_data(int selected_item, void* data) | 1287 | static int runtime_speak_data(int selected_item, void* data) |
1288 | { | 1288 | { |
1289 | (void) data;(void)selected_item; | 1289 | (void) data; |
1290 | #if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC | ||
1291 | long title_ids[] = {LANG_RUNNING_TIME, LANG_TOP_TIME}; | 1290 | long title_ids[] = {LANG_RUNNING_TIME, LANG_TOP_TIME}; |
1292 | talk_ids(false, | 1291 | talk_ids(false, |
1293 | title_ids[selected_item/2], | 1292 | title_ids[selected_item/2], |
1294 | TALK_ID((selected_item == 0) ? global_status.runtime | 1293 | TALK_ID((selected_item == 0) ? global_status.runtime |
1295 | : global_status.topruntime, UNIT_TIME)); | 1294 | : global_status.topruntime, UNIT_TIME)); |
1296 | #endif | ||
1297 | return 0; | 1295 | return 0; |
1298 | } | 1296 | } |
1299 | 1297 | ||
diff --git a/apps/talk.c b/apps/talk.c index a7baf4927a..9b699a566d 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -347,6 +347,9 @@ void talk_force_shutup(void) | |||
347 | { | 347 | { |
348 | /* Most of this is MAS only */ | 348 | /* Most of this is MAS only */ |
349 | #if CONFIG_CODEC != SWCODEC | 349 | #if CONFIG_CODEC != SWCODEC |
350 | #ifdef SIMULATOR | ||
351 | return; | ||
352 | #endif | ||
350 | unsigned char* pos; | 353 | unsigned char* pos; |
351 | unsigned char* search; | 354 | unsigned char* search; |
352 | unsigned char* end; | 355 | unsigned char* end; |
@@ -656,7 +659,7 @@ int talk_file(const char* filename, bool enqueue) | |||
656 | 659 | ||
657 | if (size != 0 && size != size_for_thumbnail) /* Don't play missing or truncated clips */ | 660 | if (size != 0 && size != size_for_thumbnail) /* Don't play missing or truncated clips */ |
658 | { | 661 | { |
659 | #if CONFIG_CODEC != SWCODEC | 662 | #if CONFIG_CODEC != SWCODEC && !defined(SIMULATOR) |
660 | bitswap(p_thumbnail, size); | 663 | bitswap(p_thumbnail, size); |
661 | #endif | 664 | #endif |
662 | queue_clip(p_thumbnail, size, enqueue); | 665 | queue_clip(p_thumbnail, size, enqueue); |
diff --git a/apps/talk.h b/apps/talk.h index bb05bd8321..50759bc026 100644 --- a/apps/talk.h +++ b/apps/talk.h | |||
@@ -93,18 +93,6 @@ void talk_date(struct tm *tm, bool enqueue); | |||
93 | /* This (otherwise invalid) ID signals the end of the array. */ | 93 | /* This (otherwise invalid) ID signals the end of the array. */ |
94 | #define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY | 94 | #define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY |
95 | 95 | ||
96 | /* We don't build talk.c for hwcodec sims so we need to define these as empty */ | ||
97 | #if defined(SIMULATOR) && !(CONFIG_CODEC == SWCODEC) | ||
98 | #define talk_init(...) | ||
99 | #define talk_buffer_steal(...) | ||
100 | #define talk_shutup(...) | ||
101 | #define talk_force_enqueue_next(...) | ||
102 | #define talk_idarray(...) | ||
103 | #define talk_ids(...) | ||
104 | #define cond_talk_ids(...) | ||
105 | #define cond_talk_ids_fq(...) | ||
106 | #else | ||
107 | |||
108 | /* Enqueue next utterance even if enqueue parameter is false: don't | 96 | /* Enqueue next utterance even if enqueue parameter is false: don't |
109 | interrupt the current utterance. */ | 97 | interrupt the current utterance. */ |
110 | void talk_force_enqueue_next(void); | 98 | void talk_force_enqueue_next(void); |
@@ -135,5 +123,5 @@ int talk_idarray(long *idarray, bool enqueue); | |||
135 | talk_force_enqueue_next(); \ | 123 | talk_force_enqueue_next(); \ |
136 | } \ | 124 | } \ |
137 | }while(0) | 125 | }while(0) |
138 | #endif /*defined(SIMULATOR) && !(CONFIG_CODEC == SWCODEC)*/ | 126 | |
139 | #endif /* __TALK_H__ */ | 127 | #endif /* __TALK_H__ */ |
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c index c5c747ac2c..b2b7205318 100644 --- a/firmware/mp3_playback.c +++ b/firmware/mp3_playback.c | |||
@@ -590,6 +590,25 @@ unsigned char* mp3_get_pos(void) | |||
590 | { | 590 | { |
591 | return (unsigned char*)SAR3; | 591 | return (unsigned char*)SAR3; |
592 | } | 592 | } |
593 | #else /* #ifndef SIMULATOR */ | ||
593 | 594 | ||
595 | void mp3_play_pause(bool play) | ||
596 | { | ||
597 | (void)play; | ||
598 | } | ||
599 | void mp3_play_stop(void) | ||
600 | { | ||
601 | } | ||
594 | 602 | ||
595 | #endif /* #ifndef SIMULATOR */ | 603 | unsigned char* mp3_get_pos(void) |
604 | { | ||
605 | return NULL; | ||
606 | } | ||
607 | |||
608 | void mp3_play_data(const unsigned char* start, int size, | ||
609 | void (*get_more)(unsigned char** start, size_t* size) /* callback fn */ | ||
610 | ) | ||
611 | { | ||
612 | (void)start; (void)size; (void)get_more; | ||
613 | } | ||
614 | #endif | ||
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c index 00716b39c6..c40d10082c 100644 --- a/uisimulator/common/stubs.c +++ b/uisimulator/common/stubs.c | |||
@@ -301,53 +301,6 @@ void button_set_flip(bool yesno) | |||
301 | (void)yesno; | 301 | (void)yesno; |
302 | } | 302 | } |
303 | 303 | ||
304 | #if CONFIG_CODEC != SWCODEC | ||
305 | |||
306 | int talk_id(int id, bool enqueue) | ||
307 | { | ||
308 | (void)id; | ||
309 | (void)enqueue; | ||
310 | return 0; | ||
311 | } | ||
312 | |||
313 | int talk_file(char* filename, bool enqueue) | ||
314 | { | ||
315 | (void)filename; | ||
316 | (void)enqueue; | ||
317 | return 0; | ||
318 | } | ||
319 | |||
320 | int talk_value(int n, int unit, bool enqueue) | ||
321 | { | ||
322 | (void)n; | ||
323 | (void)unit; | ||
324 | (void)enqueue; | ||
325 | return 0; | ||
326 | } | ||
327 | |||
328 | int talk_number(int n, bool enqueue) | ||
329 | { | ||
330 | (void)n; | ||
331 | (void)enqueue; | ||
332 | return 0; | ||
333 | } | ||
334 | |||
335 | int talk_spell(char* spell, bool enqueue) | ||
336 | { | ||
337 | (void)spell; | ||
338 | (void)enqueue; | ||
339 | return 0; | ||
340 | } | ||
341 | |||
342 | void talk_disable(bool disable) | ||
343 | { | ||
344 | (void) disable; | ||
345 | } | ||
346 | |||
347 | const char* const dir_thumbnail_name = "_dirname.talk"; | ||
348 | const char* const file_thumbnail_ext = ".talk"; | ||
349 | #endif | ||
350 | |||
351 | /* assure an unused place to direct virtual pointers to */ | 304 | /* assure an unused place to direct virtual pointers to */ |
352 | #define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */ | 305 | #define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */ |
353 | unsigned char vp_dummy[VIRT_SIZE]; | 306 | unsigned char vp_dummy[VIRT_SIZE]; |