summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-11-20 19:50:52 +0000
committerNils Wallménius <nils@rockbox.org>2007-11-20 19:50:52 +0000
commitacbd78023965cce0b0499ff150caf8078cb33b58 (patch)
tree5da45c3ae17f0ec27b5057910feec68ff35ec377 /apps/talk.c
parentade8ae9acbcaaf2a61fed00160f6c46aba052c16 (diff)
downloadrockbox-acbd78023965cce0b0499ff150caf8078cb33b58.zip
rockbox-acbd78023965cce0b0499ff150caf8078cb33b58.tar.gz
rockbox-acbd78023965cce0b0499ff150caf8078cb33b58.tar.bz2
rockbox-acbd78023965cce0b0499ff150caf8078cb33b58.tar.xz
Make id's created with the TALK_ID macro work in 64 bit sims
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15723 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 332a10f..012048a 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -559,17 +559,17 @@ void talk_buffer_steal(void)
/* play a voice ID from voicefile */
-int talk_id(long id, bool enqueue)
+int talk_id(int32_t id, bool enqueue)
{
long clipsize;
unsigned char* clipbuf;
- int unit;
+ int32_t unit;
if (talk_temp_disable_count > 0)
return -1; /* talking has been disabled */
#if CONFIG_CODEC != SWCODEC
if (audio_status()) /* busy, buffer in use */
- return -1;
+ return -1;
#endif
if (p_voicefile == NULL && has_voicefile)
@@ -582,10 +582,10 @@ int talk_id(long id, bool enqueue)
return -1;
/* check if this is a special ID, with a value */
- unit = ((unsigned long)id) >> UNIT_SHIFT;
+ unit = ((uint32_t)id) >> UNIT_SHIFT;
if (unit)
{ /* sign-extend the value */
- id = (unsigned long)id << (32-UNIT_SHIFT);
+ id = (uint32_t)id << (32-UNIT_SHIFT);
id >>= (32-UNIT_SHIFT);
talk_value(id, unit, enqueue); /* speak it */
return 0; /* and stop, end of special case */