openjtalkSetVoiceSjis function

int openjtalkSetVoiceSjis(
  1. Pointer<OpenJTalk> oj,
  2. String? path
)
OPENJTALK_DLL_API bool OPENJTALK_CONVENTION openjtalk_setVoiceSjis(OpenJTalk *oj, const char *path)

Implementation

int openjtalkSetVoiceSjis(Pointer<OpenJTalk> oj, String? path) {
  final openjtalkSetVoiceSjisLookupFunction = libjtalk.lookupFunction<
      Int8 Function(Pointer<OpenJTalk> oj, Pointer<Utf8> path),
      int Function(
          Pointer<OpenJTalk> oj, Pointer<Utf8> path)>('openjtalk_setVoiceSjis');
  final pathPointer = path != null ? path.toNativeUtf8() : nullptr;
  final result = openjtalkSetVoiceSjisLookupFunction(oj, pathPointer);
  calloc.free(pathPointer);
  return result;
}