Make normalization work properly with looped regions.
This commit is contained in:
parent
d490e88707
commit
32f47edaa1
|
@ -775,7 +775,9 @@ Audio_Region::normalize ( void )
|
||||||
int peaks, channels;
|
int peaks, channels;
|
||||||
Peak *pbuf;
|
Peak *pbuf;
|
||||||
|
|
||||||
if ( _clip->read_peaks( length(), offset(), offset() + length(), &peaks, &pbuf, &channels ) &&
|
const nframes_t npeaks = _loop ? _loop : length();
|
||||||
|
|
||||||
|
if ( _clip->read_peaks( npeaks, offset(), offset() + npeaks, &peaks, &pbuf, &channels ) &&
|
||||||
peaks )
|
peaks )
|
||||||
_scale = pbuf->normalization_factor();
|
_scale = pbuf->normalization_factor();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue