JNIEXPORT jlong JNICALL
Java_com_example_ilewis_hellolowlatencyio_MainActivity_initStream(
    JNIEnv *env,
    jobject instance) {
  HowieStreamCreationParams hscp = {
      sizeof(HowieStreamCreationParams), HOWIE_STREAM_DIRECTION_BOTH,
      onDeviceChanged,
      onProcess,
      onCleanup,
      sizeof(State),
      sizeof(Params),
      HOWIE_STREAM_STATE_PLAYING};

  HowieStream *pStream = nullptr;
  HowieStreamCreate(&hscp, &pStream);
  return reinterpret_cast<jlong>(pStream);
}
JNIEXPORT jlong JNICALL
Java_com_example_hellolowlatencyoutput_MainActivity_initPlayback(JNIEnv *env,
                                                                 jclass type) {

  HowieStreamCreationParams hscp = {
      sizeof(HowieStreamCreationParams), HOWIE_STREAM_DIRECTION_PLAYBACK,
      onDeviceChanged,
      onProcess,
      onCleanup,
      sizeof(struct PlayerState),
      sizeof(struct PlayerParams),
      HOWIE_STREAM_STATE_STOPPED
  };
  jlong stream;
  HowieStreamCreate(&hscp, (HowieStream**)&stream);
  return stream;
}