GmEsoft / SP0256_CTS256A-AL2

G.I./Microchip SP0256 Speech Processor and CTS256A-AL2 Text-To-Speech Processor Emulation
GNU General Public License v3.0
5 stars 2 forks source link

SP0256 Behavioral Difference #5

Open stroebeljc opened 7 months ago

stroebeljc commented 7 months ago

In actual SP0256 hardware there are no guards around execution of the micro and filter. They're always running. So, shouldn't sp0256_getNextSample() be:

int sp0256_getNextSample()
{
    ivoice_t *ivoice = &intellivoice;
    uint32_t optr = 0;
    int16_t out = 0;

    sp0256_micro(ivoice);

    lpc12_update(&ivoice->filt, 1, &out, &optr);

    //dsprintf(( "%d\t%d\n", nSample++, (int8_t)(out >> 8) ));
    dsprintf(( "%ld\t%4d\t%*c\n", nSample++, (int8_t)(out >> 8), (int8_t)(out >> 9)+64, '+' ));

    return out;
}

This more accurately reflects the behavior I have seen on the actual hardware.

Regards, John