voicevoxErrorResultToMessage function

String? voicevoxErrorResultToMessage(
  1. int resultCode
)

結果コードに対応したメッセージ文字列を取得する。

@param in result_code 結果コード

@returns 結果コードに対応したメッセージ文字列

\examples{

const char *actual = voicevox_error_result_to_message(VOICEVOX_RESULT_OK);
const char *EXPECTED = "エラーが発生しませんでした";
assert(strcmp(actual, EXPECTED) == 0);
const char *actual =
voicevox_error_result_to_message(VOICEVOX_RESULT_LOAD_MODEL_ERROR);
const char *EXPECTED = "modelデータ読み込みに失敗しました";
assert(strcmp(actual, EXPECTED) == 0);

}

\no-orig-impl{voicevox_error_result_to_message}

__declspec(dllimport) const char *voicevox_error_result_to_message(VoicevoxResultCode result_code)

Implementation

String? voicevoxErrorResultToMessage(int resultCode) {
  final voicevoxErrorResultToMessageLookupFunction = _libCore
      .lookupFunction<
        Pointer<Utf8> Function(Int32),
        Pointer<Utf8> Function(int)
      >('voicevox_error_result_to_message');

  return voicevoxErrorResultToMessageLookupFunction(resultCode).toDartString();
}