Check this out, Im trying to allow the user to select from multiple voices. Freespace needs to pick up an id number from the registry set by the launcher. Freespace defines Assert by:
#if defined(NDEBUG)
#define Assert(x) do {} while (0)
#else
void gr_activate(int);
#define Assert(x) do { if (!(x)){ gr_activate(0); WinAssert(#x,__FILE__,__LINE__); gr_activate(1); } } while (0)
#endif
However the SAPI code I need to use to enumerate the voices has this in one of its classes (debug only):
BOOL Assert(BOOL fEnter = TRUE)
{
if (m_fAssertSettingsReReadEachTime)
Read();
return fEnter
? Enter(_CRT_ASSERT, m_AssertMode, m_szAssertFile)
: Leave();
}
Which of course creates errors, a lot of them beginning with:
C:\Program Files\Coding\Microsoft Speech SDK 5.1\Include\SPDebug.h(80) : error C2059: syntax error : 'do'
C:\Program Files\Coding\Microsoft Speech SDK 5.1\Include\SPDebug.h(80) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
C:\Program Files\Coding\Microsoft Speech SDK 5.1\Include\SPDebug.h(80) : error C2059: syntax error : 'while'
Anyone got any ideas of how to get past this without global changes to the freespace Assert function?
I guess for now I'll have to proceed without voice selecting. Shame since there seems to be additional voice packs you can download from places.