X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsse_functions_xmm.cc;h=48212ea8e1b839363cc08e45e2ce2e86222cf72b;hb=810e59d61a46a9a7c3fdde8fac6f7ba63cdcf1b7;hp=9b37c37912c08ad0965e4e3bf3d2694f48abdcf1;hpb=449aab3c465bbbf66d221fac3d7ea559f1720357;p=ardour.git diff --git a/libs/ardour/sse_functions_xmm.cc b/libs/ardour/sse_functions_xmm.cc index 9b37c37912..48212ea8e1 100644 --- a/libs/ardour/sse_functions_xmm.cc +++ b/libs/ardour/sse_functions_xmm.cc @@ -1,6 +1,6 @@ /* Copyright (C) 2007 Paul sDavis - Written by Sampo Savolainen + Written by Sampo Savolainen 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 @@ -19,10 +19,10 @@ */ #include -#include +#include "ardour/types.h" void -x86_sse_find_peaks(const ARDOUR::Sample* buf, nframes_t nframes, float *min, float *max) +x86_sse_find_peaks(const ARDOUR::Sample* buf, ARDOUR::pframes_t nframes, float *min, float *max) { __m128 current_max, current_min, work; @@ -31,14 +31,14 @@ x86_sse_find_peaks(const ARDOUR::Sample* buf, nframes_t nframes, float *min, flo current_max = _mm_set1_ps(*max); // Work input until "buf" reaches 16 byte alignment - while ( ((unsigned long)buf) % 16 != 0 && nframes > 0) { + while ( ((intptr_t)buf) % 16 != 0 && nframes > 0) { // Load the next float into the work buffer work = _mm_set1_ps(*buf); current_min = _mm_min_ps(current_min, work); current_max = _mm_max_ps(current_max, work); - + buf++; nframes--; } @@ -77,7 +77,7 @@ x86_sse_find_peaks(const ARDOUR::Sample* buf, nframes_t nframes, float *min, flo buf+=4; nframes-=4; } - + // work through the rest < 4 samples while ( nframes > 0) { @@ -86,7 +86,7 @@ x86_sse_find_peaks(const ARDOUR::Sample* buf, nframes_t nframes, float *min, flo current_min = _mm_min_ps(current_min, work); current_max = _mm_max_ps(current_max, work); - + buf++; nframes--; }