X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fmix.cc;h=ab0d1dde59bba46e1849e49b659c9eda790ad858;hb=481f7c39655afec832ac10430dd61a3bb464aa58;hp=cdb1bd7e66a634b43f7f9c6d1c492d4a38c8b2cf;hpb=0f5dc815418c20de2658c27e59a7ef9bc451907d;p=ardour.git diff --git a/libs/ardour/mix.cc b/libs/ardour/mix.cc index cdb1bd7e66..ab0d1dde59 100644 --- a/libs/ardour/mix.cc +++ b/libs/ardour/mix.cc @@ -1,6 +1,5 @@ /* - Copyright (C) 2000-2005 Paul Davis, - Copyright (C) 2005 Sampo Savolainen + Copyright (C) 2000-2005 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,7 +30,7 @@ float debug_compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current) { - if ( ((int)buf % 16) != 0) { + if ( ((intptr_t)buf % 16) != 0) { cerr << "compute_peak(): buffer unaligned!" << endl; } @@ -41,7 +40,7 @@ debug_compute_peak (ARDOUR::Sample *buf, jack_nframes_t nsamples, float current) void debug_apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float gain) { - if ( ((int)buf % 16) != 0) { + if ( ((intptr_t)buf % 16) != 0) { cerr << "apply_gain_to_buffer(): buffer unaligned!" << endl; } @@ -51,11 +50,11 @@ debug_apply_gain_to_buffer (ARDOUR::Sample *buf, jack_nframes_t nframes, float g void debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes, float gain) { - if ( ((int)dst & 15) != 0) { + if ( ((intptr_t)dst & 15) != 0) { cerr << "mix_buffers_with_gain(): dst unaligned!" << endl; } - if ( ((int)dst & 15) != ((int)src & 15) ) { + if ( ((intptr_t)dst & 15) != ((intptr_t)src & 15) ) { cerr << "mix_buffers_with_gain(): dst & src don't have the same alignment!" << endl; mix_buffers_with_gain(dst, src, nframes, gain); } else { @@ -66,11 +65,11 @@ debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nfra void debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nframes) { - if ( ((int)dst & 15) != 0) { + if ( ((intptr_t)dst & 15) != 0) { cerr << "mix_buffers_no_gain(): dst unaligned!" << endl; } - if ( ((int)dst & 15) != ((int)src & 15) ) { + if ( ((intptr_t)dst & 15) != ((intptr_t)src & 15) ) { cerr << "mix_buffers_no_gain(): dst & src don't have the same alignment!" << endl; mix_buffers_no_gain(dst, src, nframes); } else {