/** * @param provider Delegates a call to frame provide without timeout to the timed version of it. * @return The audio frame from provide method. */ public static AudioFrame delegateToTimedProvide(AudioFrameProvider provider) { try { return provider.provide(0, TimeUnit.MILLISECONDS); } catch (TimeoutException | InterruptedException e) { ExceptionTools.keepInterrupted(e); throw new RuntimeException(e); } } }