diff options
Diffstat (limited to 'apps/talk.c')
-rw-r--r-- | apps/talk.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/talk.c b/apps/talk.c index 3e6bdb934a..0904ecd2c3 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "id3.h" | 34 | #include "id3.h" |
35 | #include "logf.h" | 35 | #include "logf.h" |
36 | #include "bitswap.h" | 36 | #include "bitswap.h" |
37 | #if CONFIG_HWCODEC == MASNONE | 37 | #if CONFIG_CODEC == SWCODEC |
38 | #include "playback.h" | 38 | #include "playback.h" |
39 | #endif | 39 | #endif |
40 | 40 | ||
@@ -148,7 +148,7 @@ static void load_voicefile(void) | |||
148 | int load_size; | 148 | int load_size; |
149 | int got_size; | 149 | int got_size; |
150 | int file_size; | 150 | int file_size; |
151 | #if CONFIG_HWCODEC == MASNONE | 151 | #if CONFIG_CODEC == SWCODEC |
152 | int length, i; | 152 | int length, i; |
153 | unsigned char *buf, temp; | 153 | unsigned char *buf, temp; |
154 | #endif | 154 | #endif |
@@ -205,7 +205,7 @@ static void load_voicefile(void) | |||
205 | #endif | 205 | #endif |
206 | 206 | ||
207 | /* Do a bitswap as necessary. */ | 207 | /* Do a bitswap as necessary. */ |
208 | #if CONFIG_HWCODEC == MASNONE | 208 | #if CONFIG_CODEC == SWCODEC |
209 | logf("Bitswapping voice file."); | 209 | logf("Bitswapping voice file."); |
210 | cpu_boost(true); | 210 | cpu_boost(true); |
211 | buf = (unsigned char *)(&p_voicefile->index) + | 211 | buf = (unsigned char *)(&p_voicefile->index) + |
@@ -261,7 +261,7 @@ static void mp3_callback(unsigned char** start, int* size) | |||
261 | 261 | ||
262 | if (queue[queue_read].len > 0) /* current clip not finished? */ | 262 | if (queue[queue_read].len > 0) /* current clip not finished? */ |
263 | { /* feed the next 64K-1 chunk */ | 263 | { /* feed the next 64K-1 chunk */ |
264 | #if CONFIG_HWCODEC != MASNONE | 264 | #if CONFIG_CODEC != SWCODEC |
265 | sent = MIN(queue[queue_read].len, 0xFFFF); | 265 | sent = MIN(queue[queue_read].len, 0xFFFF); |
266 | #else | 266 | #else |
267 | sent = queue[queue_read].len; | 267 | sent = queue[queue_read].len; |
@@ -279,7 +279,7 @@ re_check: | |||
279 | 279 | ||
280 | if (QUEUE_LEVEL) /* queue is not empty? */ | 280 | if (QUEUE_LEVEL) /* queue is not empty? */ |
281 | { /* start next clip */ | 281 | { /* start next clip */ |
282 | #if CONFIG_HWCODEC != MASNONE | 282 | #if CONFIG_CODEC != SWCODEC |
283 | sent = MIN(queue[queue_read].len, 0xFFFF); | 283 | sent = MIN(queue[queue_read].len, 0xFFFF); |
284 | #else | 284 | #else |
285 | sent = queue[queue_read].len; | 285 | sent = queue[queue_read].len; |
@@ -393,7 +393,7 @@ static int queue_clip(unsigned char* buf, long size, bool enqueue) | |||
393 | if (queue_level == 0) | 393 | if (queue_level == 0) |
394 | { /* queue was empty, we have to do the initial start */ | 394 | { /* queue was empty, we have to do the initial start */ |
395 | p_lastclip = buf; | 395 | p_lastclip = buf; |
396 | #if CONFIG_HWCODEC != MASNONE | 396 | #if CONFIG_CODEC != SWCODEC |
397 | sent = MIN(size, 0xFFFF); /* DMA can do no more */ | 397 | sent = MIN(size, 0xFFFF); /* DMA can do no more */ |
398 | #else | 398 | #else |
399 | sent = size; | 399 | sent = size; |
@@ -485,7 +485,7 @@ void talk_init(void) | |||
485 | if (has_voicefile) | 485 | if (has_voicefile) |
486 | { | 486 | { |
487 | voicefile_size = filesize(filehandle); | 487 | voicefile_size = filesize(filehandle); |
488 | #if CONFIG_HWCODEC == MASNONE | 488 | #if CONFIG_CODEC == SWCODEC |
489 | voice_init(); | 489 | voice_init(); |
490 | #endif | 490 | #endif |
491 | close(filehandle); /* close again, this was just to detect presence */ | 491 | close(filehandle); /* close again, this was just to detect presence */ |
@@ -519,7 +519,7 @@ int talk_id(long id, bool enqueue) | |||
519 | unsigned char* clipbuf; | 519 | unsigned char* clipbuf; |
520 | int unit; | 520 | int unit; |
521 | 521 | ||
522 | #if CONFIG_HWCODEC != MASNONE | 522 | #if CONFIG_CODEC != SWCODEC |
523 | if (audio_status()) /* busy, buffer in use */ | 523 | if (audio_status()) /* busy, buffer in use */ |
524 | return -1; | 524 | return -1; |
525 | #endif | 525 | #endif |
@@ -586,7 +586,7 @@ int talk_file(const char* filename, bool enqueue) | |||
586 | 586 | ||
587 | if (size) | 587 | if (size) |
588 | { | 588 | { |
589 | #if CONFIG_HWCODEC != MASNONE | 589 | #if CONFIG_CODEC != SWCODEC |
590 | bitswap(p_thumbnail, size); | 590 | bitswap(p_thumbnail, size); |
591 | #endif | 591 | #endif |
592 | queue_clip(p_thumbnail, size, enqueue); | 592 | queue_clip(p_thumbnail, size, enqueue); |
@@ -603,7 +603,7 @@ int talk_number(long n, bool enqueue) | |||
603 | int level = 0; /* mille count */ | 603 | int level = 0; /* mille count */ |
604 | long mil = 1000000000; /* highest possible "-illion" */ | 604 | long mil = 1000000000; /* highest possible "-illion" */ |
605 | 605 | ||
606 | #if CONFIG_HWCODEC != MASNONE | 606 | #if CONFIG_CODEC != SWCODEC |
607 | if (audio_status()) /* busy, buffer in use */ | 607 | if (audio_status()) /* busy, buffer in use */ |
608 | return -1; | 608 | return -1; |
609 | #endif | 609 | #endif |
@@ -684,7 +684,7 @@ int talk_value(long n, int unit, bool enqueue) | |||
684 | VOICE_HERTZ, | 684 | VOICE_HERTZ, |
685 | }; | 685 | }; |
686 | 686 | ||
687 | #if CONFIG_HWCODEC != MASNONE | 687 | #if CONFIG_CODEC != SWCODEC |
688 | if (audio_status()) /* busy, buffer in use */ | 688 | if (audio_status()) /* busy, buffer in use */ |
689 | return -1; | 689 | return -1; |
690 | #endif | 690 | #endif |
@@ -718,7 +718,7 @@ int talk_spell(const char* spell, bool enqueue) | |||
718 | { | 718 | { |
719 | char c; /* currently processed char */ | 719 | char c; /* currently processed char */ |
720 | 720 | ||
721 | #if CONFIG_HWCODEC != MASNONE | 721 | #if CONFIG_CODEC != SWCODEC |
722 | if (audio_status()) /* busy, buffer in use */ | 722 | if (audio_status()) /* busy, buffer in use */ |
723 | return -1; | 723 | return -1; |
724 | #endif | 724 | #endif |