Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid enum values for -v (glsource, voicing source) #4

Open
chdh opened this issue Mar 15, 2019 · 0 comments
Open

Invalid enum values for -v (glsource, voicing source) #4

chdh opened this issue Mar 15, 2019 · 0 comments

Comments

@chdh
Copy link

chdh commented Mar 15, 2019

The documentation states:

1 = impulse train. 2 = natural simulation. 3 = natural samples

The old source code was:

#define IMPULSIVE        1
#define NATURAL          2
#define SAMPLED          3

The new source code assigns enum values starting with 0:

typedef enum
{
        IMPULSIVE,
        NATURAL,
        SAMPLED,
} klatt_voicing_source_t;

A fix could be either to specify a start value of 1 for the enum:

typedef enum
{
        IMPULSIVE = 1,
        ...

or to subtract 1 from the argument passed on the command line:

            case 'v':
                    globals->glsource = (flag) atoi(optarg) - 1;
                    break;

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant