roc-java icon indicating copy to clipboard operation
roc-java copied to clipboard

Use Duration class instead of long for time values in configs

Open ortex opened this issue 2 years ago • 3 comments

Find all fields in RocSenderConfig and RocReceiverConfig that hold durations (in nanoseconds), e.g. targetLatency, and convert them from long to Duration. Adjust JNI side accordingly.

Fields of interest:

SenderConfig:

  • PacketLength

ReceiverConfig

  • TargetLatency
  • MaxLatencyOverrun
  • MaxLatencyUnderrun
  • NoPlaybackTimeout
  • BrokenPlaybackTimeout
  • BreakageDetectionWindow

ortex avatar May 13 '23 19:05 ortex

Could you elaborate whether to make new JNI file or Edit existing one because there it is written do not change it's machine generated ....

NIveX2169 avatar May 22 '23 08:05 NIveX2169

Need to edit existing one, e.g. https://github.com/roc-streaming/roc-java/blob/21342c2325582c960c5980f94603d1c00c9e8247/roc_jni/src/main/impl/receiver.c#L57-L60

machine generated - it's only header files, no need to touch them in this task

ortex avatar May 22 '23 16:05 ortex

Unfinished PR: #122

gavv avatar Oct 12 '23 06:10 gavv