1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-25 13:29:38 +00:00

FFI: Update documentation comments to match their Rust equivilents.

This commit is contained in:
mcb2003 2020-12-12 17:06:58 +00:00
parent 195ccbeb23
commit c0f9250099

View File

@ -38,8 +38,8 @@ pub extern "C" fn tts_clear_error() {
}); });
} }
/// Creates a new TTS object with the specified backend and returns a pointer to it. /// Create a new `TTS` instance with the specified backend.
/// If an error occured, a null pointer is returned, /// If an error occures, returns a null pointer,
/// Call `tts_get_error()` for more information about the specific error. /// Call `tts_get_error()` for more information about the specific error.
#[no_mangle] #[no_mangle]
pub extern "C" fn tts_new(backend: Backends) -> *mut TTS { pub extern "C" fn tts_new(backend: Backends) -> *mut TTS {
@ -52,8 +52,8 @@ pub extern "C" fn tts_new(backend: Backends) -> *mut TTS {
} }
} }
/// Creates a new TTS object with the default backend and returns a pointer to it. /// Create a new TTS object with the default backend.
/// If an error occured, a null pointer is returned, /// If an error occures, returns a null pointer,
/// Call `tts_get_error()` for more information about the specific error. /// Call `tts_get_error()` for more information about the specific error.
#[no_mangle] #[no_mangle]
pub extern "C" fn tts_default() -> *mut TTS { pub extern "C" fn tts_default() -> *mut TTS {
@ -66,7 +66,7 @@ pub extern "C" fn tts_default() -> *mut TTS {
} }
} }
/// Frees the memory associated with a TTS object. /// Free the memory associated with a TTS object.
/// If `tts` is a null pointer, this function does nothing. /// If `tts` is a null pointer, this function does nothing.
#[no_mangle] #[no_mangle]
pub extern "C" fn tts_free(tts: *mut TTS) { pub extern "C" fn tts_free(tts: *mut TTS) {
@ -79,7 +79,7 @@ pub extern "C" fn tts_free(tts: *mut TTS) {
} }
/// Returns the features supported by this TTS engine. /// Returns the features supported by this TTS engine.
/// tts must be a valid pointer to a TTS object. /// `tts` must be a valid pointer to a TTS object.
#[no_mangle] #[no_mangle]
pub extern "C" fn tts_supported_features(tts: *mut TTS) -> Features { pub extern "C" fn tts_supported_features(tts: *mut TTS) -> Features {
unsafe { tts.as_ref().unwrap().supported_features() } unsafe { tts.as_ref().unwrap().supported_features() }