Use constants for the phARTICULATION values.

This commit is contained in:
Reece H. Dunn
2017-01-29 00:24:38 +00:00
parent f0d4a98b96
commit 01e289c3d7
3 changed files with 29 additions and 15 deletions
+14 -14
View File
@@ -73,60 +73,60 @@ phoneme_add_feature(PHONEME_TAB *phoneme,
// place of articulation
case blb:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 1 << 16;
phoneme->phflags |= phPLACE_BILABIAL << 16;
break;
case lbd:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 2 << 16;
phoneme->phflags |= phPLACE_LABIODENTAL << 16;
break;
case dnt:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 3 << 16;
phoneme->phflags |= phPLACE_DENTAL << 16;
break;
case alv:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 4 << 16;
phoneme->phflags |= phPLACE_ALVEOLAR << 16;
break;
case rfx:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 5 << 16;
phoneme->phflags |= phPLACE_RETROFLEX << 16;
break;
case pla:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 6 << 16;
phoneme->phflags |= phPLACE_PALATO_ALVEOLAR << 16;
break;
case pal:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 7 << 16;
phoneme->phflags |= phPLACE_PALATAL << 16;
phoneme->phflags |= phPALATAL;
break;
case vel:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 8 << 16;
phoneme->phflags |= phPLACE_VELAR << 16;
break;
case lbv:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 9 << 16;
phoneme->phflags |= phPLACE_LABIO_VELAR << 16;
break;
case uvl:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 10 << 16;
phoneme->phflags |= phPLACE_UVULAR << 16;
break;
case phr:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 11 << 16;
phoneme->phflags |= phPLACE_PHARYNGEAL << 16;
break;
case glt:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 12 << 16;
phoneme->phflags |= phPLACE_GLOTTAL << 16;
break;
case bld:
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 1 << 16; // bilabial
phoneme->phflags |= phPLACE_BILABIAL << 16;
break;
case alp: // pla pzd
phoneme->phflags &= ~phARTICULATION;
phoneme->phflags |= 6 << 16;
phoneme->phflags |= phPLACE_PALATO_ALVEOLAR << 16;
phoneme->phflags |= phPALATAL;
break;
// voice
+14
View File
@@ -137,6 +137,20 @@ phoneme_feature_t phoneme_feature_from_string(const char *feature);
#define phDELETED 14
#define phINVALID 15
// places of articulation (phARTICULATION)
#define phPLACE_BILABIAL 1
#define phPLACE_LABIODENTAL 2
#define phPLACE_DENTAL 3
#define phPLACE_ALVEOLAR 4
#define phPLACE_RETROFLEX 5
#define phPLACE_PALATO_ALVEOLAR 6
#define phPLACE_PALATAL 7
#define phPLACE_VELAR 8
#define phPLACE_LABIO_VELAR 9
#define phPLACE_UVULAR 10
#define phPLACE_PHARYNGEAL 11
#define phPLACE_GLOTTAL 12
// phflags
#define phFLAGBIT_UNSTRESSED 1
#define phFLAGBIT_VOICELESS 3
+1 -1
View File
@@ -333,7 +333,7 @@ typedef struct {
#define i_isVel 0x28
#define CONDITION_IS_PHONEME_TYPE 0x00
#define CONDITION_IS_PHFLAG_SET 0x40
#define CONDITION_IS_PHFLAG_SET 0x40
#define i_StressLevel 0x800