1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-09-28 23:29:38 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
mcb2003
53f352e1a8 FFI: Update documentation comments to match their Rust equivilents. 2020-12-31 13:54:15 +00:00
mcb2003
f6546303f8 FFI: Allow determining TTS supported Features from C/C++ 2020-12-31 13:54:15 +00:00
mcb2003
8e86afb444 FFI: Implement tts_new(backend)
This required giving the Backends enum and Features struct a C
representation.
2020-12-31 13:54:15 +00:00
mcb2003
5e7ab42f59 FFI: Implement tts_default() constructor and tts_free() destructor
* tts_default() allocates a new TTS struct via it's default() constructor, returning a pointer to it or NULL on error.
* tts_free(tts) destroys the TTS pointed to by tts. If tts is NULL, this
  function does nothing.
2020-12-31 13:54:15 +00:00
mcb2003
c5bbbfcfd7 FFI: Create error handling code and LAST_ERROR static
Any errors reported will cause the C API functions to return an error
value (NULL or -1). The caller can then use:

* const char* tts_get_error() to get a pointer to a string describing
  the error
* void tts_clear_error() to deallocate any currently stored error
message.
2020-12-31 13:54:15 +00:00
mcb2003
0ca3100a97 FFI: Create ffi Cargo feature and include ffi module. 2020-12-31 13:54:15 +00:00