jlong Java_org_videolan_libvlc_LibVLC_getAudioDelay(JNIEnv *env, jobject thiz)
{
    libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
    if (mp)
        return (jlong) libvlc_audio_get_delay(mp);
    return 0;
}
jlong
Java_org_videolan_libvlc_MediaPlayer_nativeGetAudioDelay(JNIEnv *env,
                                                         jobject thiz)
{
    vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz);

    if (!p_obj)
        return 0;

    return libvlc_audio_get_delay(p_obj->u.p_mp);
}