From c6b90a7a243afd9a5ce32bc51a59ca97a007948d Mon Sep 17 00:00:00 2001 From: Nolan Date: Thu, 10 Mar 2022 12:28:20 -0600 Subject: [PATCH] Cast values for compatibility with newer speech-dispatcher. --- speech-dispatcher/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/speech-dispatcher/src/lib.rs b/speech-dispatcher/src/lib.rs index 38f11a0..1638e73 100644 --- a/speech-dispatcher/src/lib.rs +++ b/speech-dispatcher/src/lib.rs @@ -411,17 +411,17 @@ impl Connection { } pub fn set_voice_type(&self, voice_type: VoiceType) -> Result<(), Error> { - let v = unsafe { spd_set_voice_type(*self.0, voice_type as u32) }; + let v = unsafe { spd_set_voice_type(*self.0, voice_type as i32) }; c_int_to_result(v) } pub fn set_voice_type_all(&self, voice_type: VoiceType) -> Result<(), Error> { - let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as u32) }; + let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as i32) }; c_int_to_result(v) } pub fn set_voice_type_uid(&self, voice_type: VoiceType, target_uid: u32) -> Result<(), Error> { - let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as u32, target_uid) }; + let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as i32, target_uid) }; c_int_to_result(v) }