Skip to content

Commit

Permalink
defaultオプション生成関数にmakeをつけた 
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty2501 committed Aug 25, 2022
1 parent f6e4d9b commit 4da20dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions crates/voicevox_core_c_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub struct VoicevoxInitializeOptions {
}

#[no_mangle]
pub extern "C" fn voicevox_default_initialize_options() -> VoicevoxInitializeOptions {
pub extern "C" fn voicevox_make_default_initialize_options() -> VoicevoxInitializeOptions {
VoicevoxInitializeOptions::default()
}

Expand Down Expand Up @@ -184,7 +184,7 @@ pub struct VoicevoxAudioQueryOptions {
}

#[no_mangle]
pub extern "C" fn voicevox_default_audio_query_options() -> VoicevoxAudioQueryOptions {
pub extern "C" fn voicevox_make_default_audio_query_options() -> VoicevoxAudioQueryOptions {
voicevox_core::AudioQueryOptions::default().into()
}

Expand Down Expand Up @@ -213,7 +213,7 @@ pub struct VoicevoxSynthesisOptions {
enable_interrogative_upspeak: bool,
}

pub extern "C" fn voicevox_default_synthesis_options() -> VoicevoxSynthesisOptions {
pub extern "C" fn voicevox_make_default_synthesis_options() -> VoicevoxSynthesisOptions {
VoicevoxSynthesisOptions::default()
}

Expand Down Expand Up @@ -258,7 +258,7 @@ pub struct VoicevoxTtsOptions {
}

#[no_mangle]
pub extern "C" fn voicevox_default_tts_options() -> VoicevoxTtsOptions {
pub extern "C" fn voicevox_make_default_tts_options() -> VoicevoxTtsOptions {
voicevox_core::TtsOptions::default().into()
}

Expand Down
2 changes: 1 addition & 1 deletion example/cpp/unix/simple_tts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) {

std::cout << "coreの初期化中..." << std::endl;

auto initialize_options = voicevox_default_initialize_options();
auto initialize_options = voicevox_make_default_initialize_options();
initialize_options.load_all_models = true;
initialize_options.open_jtalk_dict_dir = open_jtalk_dict_path.c_str();
if (voicevox_initialize(initialize_options) != VOICEVOX_RESULT_SUCCEED) {
Expand Down

0 comments on commit 4da20dd

Please sign in to comment.