From d7d10524cfe091cc0fea638a304528a8cede2bae Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Tue, 13 Jun 2023 22:43:20 +0900 Subject: [PATCH] `voicevox_{,synthesizer_}is_loaded_voice_model` https://github.com/VOICEVOX/voicevox_core/pull/370#discussion_r1141398622 Co-authored-by: Hiroshiba --- crates/voicevox_core_c_api/include/voicevox_core.h | 4 ++-- crates/voicevox_core_c_api/src/lib.rs | 2 +- crates/voicevox_core_c_api/tests/e2e/symbols.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/voicevox_core_c_api/include/voicevox_core.h b/crates/voicevox_core_c_api/include/voicevox_core.h index fb5b53277..d3149ffd5 100644 --- a/crates/voicevox_core_c_api/include/voicevox_core.h +++ b/crates/voicevox_core_c_api/include/voicevox_core.h @@ -388,8 +388,8 @@ bool voicevox_synthesizer_is_gpu_mode(const struct VoicevoxSynthesizer *synthesi #ifdef _WIN32 __declspec(dllimport) #endif -bool voicevox_is_loaded_voice_model(const struct VoicevoxSynthesizer *synthesizer, - VoicevoxVoiceModelId model_id); +bool voicevox_synthesizer_is_loaded_voice_model(const struct VoicevoxSynthesizer *synthesizer, + VoicevoxVoiceModelId model_id); /** * メタ情報をjsonで取得する diff --git a/crates/voicevox_core_c_api/src/lib.rs b/crates/voicevox_core_c_api/src/lib.rs index 212b0ae28..435da99f5 100644 --- a/crates/voicevox_core_c_api/src/lib.rs +++ b/crates/voicevox_core_c_api/src/lib.rs @@ -320,7 +320,7 @@ pub extern "C" fn voicevox_synthesizer_is_gpu_mode(synthesizer: &VoicevoxSynthes /// @param synthesizer 有効な #VoicevoxSynthesizer へのポインタであること /// @param model_id NULL終端文字列 #[no_mangle] -pub unsafe extern "C" fn voicevox_is_loaded_voice_model( +pub unsafe extern "C" fn voicevox_synthesizer_is_loaded_voice_model( synthesizer: &VoicevoxSynthesizer, model_id: VoicevoxVoiceModelId, ) -> bool { diff --git a/crates/voicevox_core_c_api/tests/e2e/symbols.rs b/crates/voicevox_core_c_api/tests/e2e/symbols.rs index dc98c2f2c..7f0f1e079 100644 --- a/crates/voicevox_core_c_api/tests/e2e/symbols.rs +++ b/crates/voicevox_core_c_api/tests/e2e/symbols.rs @@ -49,7 +49,7 @@ pub(crate) struct Symbols<'lib> { >, pub(crate) voicevox_synthesizer_is_gpu_mode: Symbol<'lib, unsafe extern "C" fn(*const VoicevoxSynthesizer) -> bool>, - pub(crate) voicevox_is_loaded_voice_model: Symbol< + pub(crate) voicevox_synthesizer_is_loaded_voice_model: Symbol< 'lib, unsafe extern "C" fn(*const VoicevoxSynthesizer, VoicevoxVoiceModelId) -> bool, >, @@ -150,7 +150,7 @@ impl<'lib> Symbols<'lib> { voicevox_synthesizer_load_voice_model, voicevox_synthesizer_unload_voice_model, voicevox_synthesizer_is_gpu_mode, - voicevox_is_loaded_voice_model, + voicevox_synthesizer_is_loaded_voice_model, voicevox_synthesizer_get_metas_json, voicevox_create_supported_devices_json, voicevox_synthesizer_audio_query,