rhdunn / klatt

derivative of the klatt 3.04 synthesizer
http://reecedunn.co.uk/klatt
GNU General Public License v3.0
37 stars 9 forks source link

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

Open chdh opened 5 years ago

chdh commented 5 years ago

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!](https://www.bountysource.com/issues/71419112-invalid-enum-values-for-v-glsource-voicing-source?utm_campaign=plugin&utm_content=tracker%2F254965&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254965&utm_medium=issues&utm_source=github).