[SCM] calf/master: + Organ, Framework: use std::vector::front() instead of std::vector::data() (may possibly fix the MacOS X compilation problem reported by Daniel Klaffenbach and Tobias Doerffel)

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:39:35 UTC 2013


The following commit has been merged in the master branch:
commit 628eb1543591f5137e6001abad439d01942ffd4a
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Mon Oct 5 22:31:19 2009 +0100

    + Organ, Framework: use std::vector::front() instead of std::vector::data() (may possibly fix the MacOS X compilation problem reported by Daniel Klaffenbach and Tobias Doerffel)

diff --git a/src/calf/osc.h b/src/calf/osc.h
index 36c19fe..ba01a2f 100644
--- a/src/calf/osc.h
+++ b/src/calf/osc.h
@@ -146,7 +146,7 @@ struct bandlimiter
                 new_spec[SIZE - i] = 0.f;
         }
         // convert back to time domain (IFFT) and extract only real part
-        fft.calculate(new_spec.data(), iffted.data(), true);
+        fft.calculate(&new_spec.front(), &iffted.front(), true);
         for (int i = 0; i < SIZE; i++)
             output[i] = iffted[i].real();
     }
diff --git a/src/organ.cpp b/src/organ.cpp
index 4fe59ae..0d531c4 100644
--- a/src/organ.cpp
+++ b/src/organ.cpp
@@ -174,9 +174,10 @@ static void padsynth(bandlimiter<ORGAN_WAVE_BITS> blSrc, bandlimiter<ORGAN_BIG_W
     // same as above - put large array on heap to avoid stack overflow in ingen
     vector<float> tmp;
     tmp.resize(ORGAN_BIG_WAVE_SIZE);
-    blDest.compute_waveform(tmp.data());
-    normalize_waveform(tmp.data(), ORGAN_BIG_WAVE_SIZE);
-    blDest.compute_spectrum(tmp.data());
+    float *ptmp = &tmp.front();
+    blDest.compute_waveform(ptmp);
+    normalize_waveform(ptmp, ORGAN_BIG_WAVE_SIZE);
+    blDest.compute_spectrum(ptmp);
     
     // limit is 1/2 of the number of harmonics of the original wave
     result.make_from_spectrum(blDest, foldover, ORGAN_WAVE_SIZE >> (1 + ORGAN_BIG_WAVE_SHIFT));

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list