Hello I am have a strange behaviour with my code.
After calling espeak_Synth with a SynthCallback the program crashes while attempting to use std:cin.
I am attaching my code, the output and the debugger output.
I hope some one can help me.
Regards
Mario
Sorry, I have no idea.
The line:
cin >> i;
isn't anything to do with eSpeak directly. Perhaps something has corrupted the stack or overwritten some memory in error?
Your attachment doesn't include the contents of the files rovioSpeak.cpp and rovioSpeak.h (they are only links), so I don't know what they do.
Sorry I am attaching now the h and cpp file. Please take a look at is is very important, the code is part of larger class which is crashing in an other std stream, I am trying to fin the cause of the crash and I find this strange behaviour with cin.
I have commented all the code inside the call back to isolate the problem. I would really appreciate if you can take a look at my code.
Regards
Mario
I hope you will be able yo help me.
I think the problem is your variable:
unsigned int* unique_identifier;
in rovioSpeak::speak()
is a pointer which is not initialized. It doesn't point to an integer variable.
You could change it to:
unsigned int unique_identifier;
espeak_Synth(,,,,,, &unique_identifier, );
or alternatively, if you don't need it you can use:
espeak_Synth(,,,,,, NULL, );
I'll change to comment in speak_lib.h to better explain the use of this parameter.
Thank you very much that solves all the problems. It was a silly mistake.
Regards
Mario