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

Compiling under VS2022 #2

Open antibyte opened 1 year ago

antibyte commented 1 year ago

VS2022 says buffer overflow in:

void outWaveFlush() { while( audioCurrentBufferPos_ < AUDIO_BUFFERLENGTH ) { audioBuffers[audioCurrentBuffer][audioCurrentBufferPos++] = audioCurrentLevelL; audioBuffers[audioCurrentBuffer][audioCurrentBufferPos++] = audioCurrentLevelR_; }

I think it shoud be while( audioCurrentBufferPos_ < AUDIO_BUFFER_LENGTH -1 )

Also needed to rename typedef uint64_t to get it to compile under VS2022.

It works now but i get strange noise after the demo text is spoken.

GmEsoft commented 11 months ago

Thanks for your comment. Did you try building from the develop_VS2017 branch ? Most of the migration issues to VS2022 should be solved.

And regarding the "while" loop, because AUDIO_BUFFER_LENGTH is even by definition, it shouldn't make a difference ...

GmEsoft commented 10 months ago

I have published a new pre-release 0.0.6-alpha, and updated the master branch with the latest fixes. Can you please try again?

Thanks :)