Cast values for compatibility with newer speech-dispatcher.

This commit is contained in:
Nolan Darilek 2022-03-10 12:28:20 -06:00 committed by Nolan Darilek
parent ee6aba7a97
commit c6b90a7a24

View File

@ -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)
}