View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006806 | ardour | bugs | public | 2016-02-29 21:18 | 2020-04-19 20:17 |
Reporter | feandin | Assigned To | x42 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86_64 | OS | Ubuntu | OS Version | 15.10 |
Product Version | 4.6 | ||||
Summary | 0006806: Strip Silence dialog incorrectly splits regions. | ||||
Description | Problem occurs when user strips silence from region which is shorter than it's linked source file. For very short regions (1 sec and below) it resulted in creation of many unwanted regions with total length exceeding primary region length. Expected behaviour is that range of regions after striping silence is equal to range of initial region being striped. | ||||
Steps To Reproduce | 1. Record/import at least 5 sec of audio. It should contain distinct silent areas (for example percussive beat). 2. Make this region short (0.5 sec) 3. Run Strip Silence dialog and set threshold appropriately. PROBLEM: Silence intervals appear. However some of them reach far beyond region boundaries. 4. Apply transformation. PROBLEM: Incorrect regions created. | ||||
Additional Information | The problem is in AudioRegion::find_silence. There is loop which processes audio in 64kB blocks (it is about 1.5 seconds of audio with 44.1khz). I managed to create simple patch. | ||||
Tags | No tags attached. | ||||
|
stripsilence.patch (830 bytes)
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index ddd152b..cca522b 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -1819,9 +1819,11 @@ AudioRegion::find_silence (Sample threshold, framecnt_t min_length, framecnt_t f framecnt_t cur_samples = 0; /* fill `loudest' with the loudest absolute sample at each instant, across all channels */ memset (loudest.get(), 0, sizeof (Sample) * block_size); + framecnt_t to_read = ((end - pos) < block_size) ? (end - pos) : block_size; + for (uint32_t n = 0; n < n_channels(); ++n) { - cur_samples = read_raw_internal (buf.get(), pos, block_size, n); + cur_samples = read_raw_internal (buf.get(), pos, to_read, n); for (framecnt_t i = 0; i < cur_samples; ++i) { loudest[i] = max (loudest[i], abs (buf[i])); } |
|
fixed in Ardour 4.7-287-gc1ce5dd via https://github.com/Ardour/ardour/pull/214 |
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-02-29 21:18 | feandin | New Issue | |
2016-02-29 21:18 | feandin | File Added: stripsilence.patch | |
2016-03-05 15:01 | x42 | Note Added: 0018040 | |
2016-03-05 15:01 | x42 | Status | new => resolved |
2016-03-05 15:01 | x42 | Resolution | open => fixed |
2016-03-05 15:01 | x42 | Assigned To | => x42 |
2020-04-19 20:17 | system | Note Added: 0023599 | |
2020-04-19 20:17 | system | Status | resolved => closed |