- Timestamp:
- Jan 9, 2010, 5:03:11 PM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 7581185
- Parents:
- 066433d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/fft.c
r066433d rd453a4a 28 28 * c++ projects can still use their own complex definition. */ 29 29 #include <fftw3.h> 30 #include <pthread.h> 30 31 31 32 #ifdef HAVE_COMPLEX_H … … 73 74 #endif /* HAVE_FFTW3F */ 74 75 76 // a global mutex for FFTW thread safety 77 pthread_mutex_t aubio_fftw_mutex = PTHREAD_MUTEX_INITIALIZER; 78 75 79 struct _aubio_fft_t { 76 80 uint_t winsize; … … 91 95 s->compspec = new_fvec(winsize); 92 96 /* create plans */ 97 pthread_mutex_lock(&aubio_fftw_mutex); 93 98 #ifdef HAVE_COMPLEX_H 94 99 s->fft_size = winsize/2 + 1; … … 102 107 s->pbw = fftw_plan_r2r_1d(winsize, s->specdata, s->out, FFTW_HC2R, FFTW_ESTIMATE); 103 108 #endif 109 pthread_mutex_unlock(&aubio_fftw_mutex); 104 110 for (i = 0; i < s->winsize; i++) { 105 111 s->in[i] = 0.;
Note: See TracChangeset
for help on using the changeset viewer.