fixed crash potential issues where nframes may be 0
git-svn-id: svn://localhost/trunk/ardour2@341 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1d42712574
commit
94ba45c057
@ -163,6 +163,8 @@ IO::apply_declick (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframe
|
||||
double fractional_shift;
|
||||
double fractional_pos;
|
||||
gain_t polscale = invert_polarity ? -1.0f : 1.0f;
|
||||
|
||||
if (nframes == 0) return;
|
||||
|
||||
fractional_shift = -1.0/declick;
|
||||
|
||||
|
@ -613,7 +613,8 @@ EqualPowerStereoPanner::distribute_automated (Sample* src, Sample** obufs,
|
||||
|
||||
/* store effective pan position. do this even if we are muted */
|
||||
|
||||
effective_x = buffers[0][nframes-1];
|
||||
if (nframes > 0)
|
||||
effective_x = buffers[0][nframes-1];
|
||||
|
||||
if (_muted) {
|
||||
return;
|
||||
|
@ -444,7 +444,7 @@ Route::process_output_buffers (vector<Sample*>& bufs, uint32_t nbufs,
|
||||
}
|
||||
}
|
||||
|
||||
if (apply_gain_automation && _session.transport_rolling()) {
|
||||
if (apply_gain_automation && _session.transport_rolling() && nframes > 0) {
|
||||
_effective_gain = gab[nframes-1];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user