diff options
author | Jesse Chappell <jesse@essej.net> | 2006-02-20 21:40:20 +0000 |
---|---|---|
committer | Jesse Chappell <jesse@essej.net> | 2006-02-20 21:40:20 +0000 |
commit | 94ba45c0571e6822268edf0ea3279901d0b93e63 (patch) | |
tree | c1d467000ca7b6bb92e7a2b17a27bba7d95f0e07 /libs/ardour | |
parent | 1d42712574b74600b7731e5737ccac2db185733b (diff) |
fixed crash potential issues where nframes may be 0
git-svn-id: svn://localhost/trunk/ardour2@341 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/io.cc | 2 | ||||
-rw-r--r-- | libs/ardour/panner.cc | 3 | ||||
-rw-r--r-- | libs/ardour/route.cc | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 91cbb1cb67..916e77b492 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -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; diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index 85feed6be9..6b0013cada 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -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; diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 5d3cd942e7..7f7b56cc2b 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -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]; } |