Fix voice_type signedness change
The signedness changed happened in speech-dispatcher 0.11, not in speech-dispatcher 0.10.2. Closes #4
This commit is contained in:
parent
6a6bc3f805
commit
8ff6902148
|
@ -11,7 +11,7 @@ before_script:
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- cargo test
|
- cargo test --no-default-features --features 0_10
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
stage: publish
|
stage: publish
|
||||||
|
|
|
@ -8,9 +8,9 @@ license = "LGPL-2.1 OR MIT OR Apache-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
0_10_2 = ["0_10"]
|
0_11 = ["0_10"]
|
||||||
0_10 = []
|
0_10 = []
|
||||||
default = ["0_10_2"]
|
default = ["0_11"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
|
|
|
@ -413,26 +413,26 @@ impl Connection {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_voice_type(&self, voice_type: VoiceType) -> Result<(), Error> {
|
pub fn set_voice_type(&self, voice_type: VoiceType) -> Result<(), Error> {
|
||||||
#[cfg(all(feature = "0_10", not(feature = "0_10_2")))]
|
#[cfg(all(feature = "0_10", not(feature = "0_11")))]
|
||||||
let v = unsafe { spd_set_voice_type(*self.0, voice_type as i32) };
|
|
||||||
#[cfg(any(feature = "0_10_2", not(feature = "0_10")))]
|
|
||||||
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 u32) };
|
||||||
|
#[cfg(any(feature = "0_11", not(feature = "0_10")))]
|
||||||
|
let v = unsafe { spd_set_voice_type(*self.0, voice_type as i32) };
|
||||||
c_int_to_result(v)
|
c_int_to_result(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_voice_type_all(&self, voice_type: VoiceType) -> Result<(), Error> {
|
pub fn set_voice_type_all(&self, voice_type: VoiceType) -> Result<(), Error> {
|
||||||
#[cfg(all(feature = "0_10", not(feature = "0_10_2")))]
|
#[cfg(all(feature = "0_10", not(feature = "0_11")))]
|
||||||
let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as i32) };
|
|
||||||
#[cfg(any(feature = "0_10_2", not(feature = "0_10")))]
|
|
||||||
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 u32) };
|
||||||
|
#[cfg(any(feature = "0_11", not(feature = "0_10")))]
|
||||||
|
let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as i32) };
|
||||||
c_int_to_result(v)
|
c_int_to_result(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_voice_type_uid(&self, voice_type: VoiceType, target_uid: u32) -> Result<(), Error> {
|
pub fn set_voice_type_uid(&self, voice_type: VoiceType, target_uid: u32) -> Result<(), Error> {
|
||||||
#[cfg(all(feature = "0_10", not(feature = "0_10_2")))]
|
#[cfg(all(feature = "0_10", not(feature = "0_11")))]
|
||||||
let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as i32, target_uid) };
|
|
||||||
#[cfg(any(feature = "0_10_2", not(feature = "0_10")))]
|
|
||||||
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 u32, target_uid) };
|
||||||
|
#[cfg(any(feature = "0_11", not(feature = "0_10")))]
|
||||||
|
let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as i32, target_uid) };
|
||||||
c_int_to_result(v)
|
c_int_to_result(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user