diff options
author | Sean Enderby <sean.enderby@gmail.com> | 2014-02-24 13:43:13 +0000 |
---|---|---|
committer | Sean Enderby <sean.enderby@gmail.com> | 2014-02-24 13:43:13 +0000 |
commit | f0e868fcf448ca3b546d318ff59f6dab12156279 (patch) | |
tree | 862b878c39e6acbb00fe1fb24ebcf086bce1493c | |
parent | e4ec6cf645cde04c282c138eaf1ed5856d5db3b3 (diff) | |
parent | ba43f60b2d0445b2739e54beb0c1813f3ac00345 (diff) | |
download | LibXtract-f0e868fcf448ca3b546d318ff59f6dab12156279.tar.gz LibXtract-f0e868fcf448ca3b546d318ff59f6dab12156279.tar.bz2 LibXtract-f0e868fcf448ca3b546d318ff59f6dab12156279.zip |
Merge branch 'master' of https://github.com/jamiebullock/LibXtract
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | examples/simpletest/simpletest.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 11b9326..2e6a1da 100644 --- a/configure.ac +++ b/configure.ac @@ -265,7 +265,7 @@ else ;; *-*-linux*) PD_CFLAGS+=" -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -fPIC" - PD_LDFLAGS+=" -shared -export_dynamic" + PD_LDFLAGS+=" -shared -export_dynamic -undefined dynamic_lookup" PD_SUFFIX=pd_linux ;; sparc-sun-*) diff --git a/examples/simpletest/simpletest.c b/examples/simpletest/simpletest.c index 443de22..df068c2 100644 --- a/examples/simpletest/simpletest.c +++ b/examples/simpletest/simpletest.c @@ -78,7 +78,7 @@ void fill_wavetable(const float frequency, waveform_type type) wavetable[i] = ((phase / (double)PERIOD) * 2) - 1.; break; case NOISE: - wavetable[i] = (arc4random_uniform(1000) / 500.0) - 1; + wavetable[i] = ((random() % 1000) / 500.0) - 1; break; } } @@ -114,7 +114,9 @@ int main(void) xtract_mel_filter mel_filters; fill_wavetable(344.53125f, NOISE); // 344.53125f = 128 samples @ 44100 Hz + /* print_wavetable(); + */ /* get the F0 */ xtract[XTRACT_WAVELET_F0](wavetable, BLOCKSIZE, &samplerate, &f0); @@ -136,7 +138,7 @@ int main(void) { printf("\nUnable to get lowest value, all values below threshold?\n\n"); } - exit(0); + /* create the window function */ window = xtract_init_window(BLOCKSIZE, XTRACT_HANN); xtract_windowed(wavetable, BLOCKSIZE, window, windowed); |