Menu

#101 ladspa: optionally perform latency compensation

None
closed-accepted
nobody
None
5
2020-08-12
2013-09-29
eric_wong
No

Some LADSPA plugins report their latency using a output control
port named "latency". We may capture the latency of the plugin
and from that port to compensate for latency the plugin introduced.

This feature exists in Ardour and appears enabled by default.
This is not enabled by default in sox as existing scripts for older
versions of sox may already compensate for latency.


I've also pushed this to my git repository

The following changes since commit a6be594c819dc408e2f72425b7de2b5c4590c1eb:

add Dolph window for spectrogram effect (2013-05-27 18:35:40 +0100)

are available in the git repository at:

git://bogomips.org/sox ladspa-latency

for you to fetch changes up to 6d9e0004bfed24d6db6d7a41fab62e665d3c8db7:

ladspa: optionally perform latency compensation (2013-09-29 06:39:54 +0000)

1 Attachments

Discussion

  • eric_wong

    eric_wong - 2013-10-10

    v2 of the patch. v1 had a leak, here is the diff between v1 and v2
    (full v2 attached as 0002-...)

    --- a/src/ladspa.c
    +++ b/src/ladspa.c
    @@ -407,7 +407,8 @@ static int sox_ladspa_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sa
     }
    
     /*
    - * Nothing to do.
    + * Nothing to do if the plugin has no latency or latency compensation is
    + * disabled.
      */
     static int sox_ladspa_drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osamp)
     {
    @@ -431,6 +432,9 @@ static int sox_ladspa_drain(sox_effect_t * effp, sox_sample_t *obuf, size_t *osa
       *osamp = min(dsamp, *osamp);
       memcpy(obuf, dbuf, *osamp * sizeof(sox_sample_t));
    
    +  free(ibuf);
    +  free(dbuf);
    +
       return r == SOX_SUCCESS ? SOX_EOF : 0;
     }
    

    The following changes since commit a6be594c819dc408e2f72425b7de2b5c4590c1eb:

    add Dolph window for spectrogram effect (2013-05-27 18:35:40 +0100)

    are available in the git repository at:

    git://bogomips.org/sox ladspa-latency

    for you to fetch changes up to af31e5211d445653a17cd557faeccdc32678c0f8:

    ladspa: optionally perform latency compensation (2013-10-10 09:32:24 +0000)

     
  • Mans Rullgard

    Mans Rullgard - 2020-08-12
    • status: open --> closed-accepted
    • Group: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.