[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/7] replace EVoiceType with SPDVoiceType
From: |
William Hubbs |
Subject: |
[PATCH 4/7] replace EVoiceType with SPDVoiceType |
Date: |
Tue, 2 Nov 2010 15:10:17 -0500 |
Hi Andrei,
this looks like a pretty serious regression. Can you please send a fix
asap?
Thanks,
William
On Tue, Nov 02, 2010 at 06:43:29PM +0000, Christopher Brannon wrote:
> Andrei Kholodnyi <andrei.kholodnyi at gmail.com> writes:
>
> > both enums are identical, replace internal EVoiceType enum with
> > public SPDVoiceType enum
>
> They most certainly are not identical!
>
> > - NO_VOICE = 0,
>
> When the server sends a setting of
> voice=null
> to the module, NO_VOICE is used to represent it in the code.
> The server sends voice=null whenever you set synthesis_voice.
>
> > -EVoiceType
> > +SPDVoiceType
> > str2EVoice(char* str)
> > {
> > - EVoiceType voice;
> > *SNIP*
> > -
> > > - else voice = NO_VOICE;
> > + else voice = -1;
>
> Now let's look at do_set, from src/modules/module_utils.c:
>
> char*
> do_set(void)
> {
> /* SNIP MUCH */
> if(!strcmp(cur_item, "voice")){
> ret = str2EVoice(cur_value);
> if (ret != -1) msg_settings.voice_type = ret;
> else err = 2;
> }
> /* SNIP MORE */
> if (err == 2) return g_strdup("303 ERROR INVALID PARAMETER OR VALUE");
>
> So do_set will always fail if the server sends voice=null. In other
> words, it fails when you try to set the synthesis voice. The simple
> solution is seemingly to remove the check for -1.
>
> -- Chris
> _______________________________________________
> Speechd mailing list
> Speechd at lists.freebsoft.org
> http://lists.freebsoft.org/mailman/listinfo/speechd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
<http://lists.freebsoft.org/pipermail/speechd/attachments/20101102/ee82675b/attachment.pgp>
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Christopher Brannon, 2010/11/02
- [PATCH 4/7] replace EVoiceType with SPDVoiceType,
William Hubbs <=
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Andrei . Kholodnyi, 2010/11/02
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Christopher Brannon, 2010/11/03
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Andrei Kholodnyi, 2010/11/03
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Andrei Kholodnyi, 2010/11/04
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Christopher Brannon, 2010/11/04
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Andrei Kholodnyi, 2010/11/04
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Tomas Cerha, 2010/11/05
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Andrei . Kholodnyi, 2010/11/05
- [PATCH 4/7] replace EVoiceType with SPDVoiceType, Hynek Hanke, 2010/11/11