openjtalkGetFullVoicePath function

Pointer<Int8> openjtalkGetFullVoicePath(
  1. Pointer<OpenJTalk> oj,
  2. String? path,
  3. Pointer<Int8> buffer
)
OPENJTALK_DLL_API char *OPENJTALK_CONVENTION openjtalk_getFullVoicePath(OpenJTalk *oj, const char *path, char *buffer)

Implementation

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