fix RESAMPLE_MP build option
Adrian Smith
9 years ago
49 | 49 | void (* soxr_delete)(soxr_t); |
50 | 50 | soxr_error_t (* soxr_process)(soxr_t, soxr_in_t, size_t, size_t *, soxr_out_t, size_t olen, size_t *); |
51 | 51 | size_t *(* soxr_num_clips)(soxr_t); |
52 | #if RESAMPLE_OPENMP | |
52 | #if RESAMPLE_MP | |
53 | 53 | soxr_runtime_spec_t (* soxr_runtime_spec)(unsigned num_threads); |
54 | 54 | #endif |
55 | 55 | // soxr_strerror is a macro so not included here |
178 | 178 | soxr_io_spec_t io_spec; |
179 | 179 | soxr_quality_spec_t q_spec; |
180 | 180 | soxr_error_t error; |
181 | #if RESAMPLE_OPENMP | |
181 | #if RESAMPLE_MP | |
182 | 182 | soxr_runtime_spec_t r_spec; |
183 | 183 | #endif |
184 | 184 | |
201 | 201 | q_spec.phase_response = r->q_phase_response; |
202 | 202 | } |
203 | 203 | |
204 | #if RESAMPLE_OPENMP | |
204 | #if RESAMPLE_MP | |
205 | 205 | r_spec = SOXR(r, runtime_spec, 0); // make use of libsoxr OpenMP support allowing parallel execution if multiple cores |
206 | 206 | #endif |
207 | 207 | |
209 | 209 | "phase_response: %03.1f, flags: 0x%02x], soxr_io_spec_t[scale: %03.2f]", q_spec.precision, |
210 | 210 | q_spec.passband_end, q_spec.stopband_begin, q_spec.phase_response, q_spec.flags, io_spec.scale); |
211 | 211 | |
212 | #if RESAMPLE_OPENMP | |
212 | #if RESAMPLE_MP | |
213 | 213 | r->resampler = SOXR(r, create, raw_sample_rate, outrate, 2, &error, &io_spec, &q_spec, &r_spec); |
214 | 214 | #else |
215 | 215 | r->resampler = SOXR(r, create, raw_sample_rate, outrate, 2, &error, &io_spec, &q_spec, NULL); |
253 | 253 | r->soxr_delete = dlsym(handle, "soxr_delete"); |
254 | 254 | r->soxr_process = dlsym(handle, "soxr_process"); |
255 | 255 | r->soxr_num_clips = dlsym(handle, "soxr_num_clips"); |
256 | #if RESAMPLE_OPENMP | |
256 | #if RESAMPLE_MP | |
257 | 257 | r->soxr_runtime_spec = dlsym(handle, "soxr_runtime_spec"); |
258 | 258 | #endif |
259 | 259 |