Different numbers for Voice Prompts

Diff functions in Custom Switches
This commit is contained in:
bsongis
2012-08-14 17:09:03 +00:00
parent b94b11d466
commit 8f103ecee3
14 changed files with 207 additions and 168 deletions
+17 -4
View File
@@ -34,8 +34,8 @@
#include "../open9x.h"
struct t_voice Voice ;
static uint8_t v_ctr ;
uint8_t v_first[8] ;
/* TODO why? static uint8_t v_ctr ;
uint8_t v_first[8] ; */
void putVoiceQueueUpper( uint8_t value )
{
@@ -48,7 +48,19 @@ void putVoiceQueueUpper( uint8_t value )
}
}
void pushPrompt( uint8_t value )
void pushCustomPrompt(uint8_t value)
{
struct t_voice *vptr ;
vptr = voiceaddress() ;
if (vptr->VoiceQueueCount < VOICE_Q_LENGTH-1)
{
pushPrompt( 0xFF ) ;
pushPrompt( value ) ;
}
}
void pushPrompt(uint8_t value)
{
#ifdef SIMU
printf("playFile(\"%04d.ad4\")\n", value); fflush(stdout);
@@ -62,10 +74,11 @@ void pushPrompt( uint8_t value )
vptr->VoiceQueueInIndex &= (VOICE_Q_LENGTH - 1);
vptr->VoiceQueueCount += 1;
}
/* TODO why?
if (v_ctr < 8) {
v_first[v_ctr] = value;
v_ctr += 1;
}
} */
}
struct t_voice *voiceaddress()
+4 -10
View File
@@ -48,13 +48,8 @@
#define V_WAIT_BUSY_OFF 4
#define V_WAIT_BUSY_DELAY 5
#if defined(TTS_CZ) && defined(PCBSTD)
#define PROMPT_SYSTEM_BASE 0
#define PROMPT_CUSTOM_BASE 40
#else
#define PROMPT_SYSTEM_BASE 170
#define PROMPT_CUSTOM_BASE 200
#endif
#define PROMPT_SYSTEM_BASE 230
#define PROMPT_CUSTOM_BASE 256
struct t_voice
{
@@ -72,9 +67,8 @@ struct t_voice
void voice_process( void ) ;
};
#if defined(TTS_CZ)
extern void putVoiceQueueUpper( uint8_t value );
#endif
extern void pushCustomPrompt( uint8_t value );
extern void pushPrompt( uint8_t value );
extern struct t_voice *voiceaddress( void ) ;
extern struct t_voice Voice ;