wrapFun ::
    Fd ->
    [Port JA.Sample Jack.Input] ->
    Process a
wrapFun wfd inputs nframes _args = do
    let send = fdWrite wfd . pure . encode
    inArrs <- mapM (flip JA.getBufferArray nframes) inputs
    forM_ inArrs $ \i -> do
        samples <- mapM (readArray i) (Jack.nframesIndices nframes)
        send $ maximum (map realToFrac samples)
    return eOK
wrapFun ::
    Fd ->
    [Port JA.Sample Jack.Input] ->
    Process a
wrapFun wfd inputs nframes _args = do
    let send = fdWrite wfd . pure . encode
    inArrs <- mapM (flip JA.getBufferArray nframes) inputs
    forM_ inArrs $ \i -> do
        samples <- mapM (readArray i) (Jack.nframesIndices nframes)
        send $ maximum (map realToFrac samples)
    return eOK
wrapFun wfd inputs nframes _args = do
    let send = fdWrite wfd . pure . encode
    inArrs <- mapM (flip JA.getBufferArray nframes) inputs
    forM_ inArrs $ \i -> do
        samples <- mapM (readArray i) (Jack.nframesIndices nframes)
        send $ maximum (map realToFrac samples)
    return eOK