[af195a5] | 1 | /* |
---|
| 2 | Copyright (C) 2016 Paul Brossier <piem@aubio.org> |
---|
| 3 | |
---|
| 4 | This file is part of aubio. |
---|
| 5 | |
---|
| 6 | aubio is free software: you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation, either version 3 of the License, or |
---|
| 9 | (at your option) any later version. |
---|
| 10 | |
---|
| 11 | aubio is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
| 15 | |
---|
| 16 | You should have received a copy of the GNU General Public License |
---|
| 17 | along with aubio. If not, see <http://www.gnu.org/licenses/>. |
---|
| 18 | |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | #include "config.h" |
---|
| 22 | |
---|
| 23 | #ifndef HAVE_RUBBERBAND |
---|
| 24 | |
---|
| 25 | #include "aubio_priv.h" |
---|
| 26 | #include "fvec.h" |
---|
| 27 | #include "effects/timestretch.h" |
---|
| 28 | |
---|
| 29 | // TODO fallback time stretching implementation |
---|
| 30 | |
---|
| 31 | struct _aubio_timestretch_t |
---|
| 32 | { |
---|
| 33 | void *dummy; |
---|
| 34 | }; |
---|
| 35 | |
---|
| 36 | void |
---|
| 37 | aubio_timestretch_do (aubio_timestretch_t * o UNUSED, fvec_t * out UNUSED, |
---|
| 38 | uint_t * read UNUSED) |
---|
| 39 | { |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | void del_aubio_timestretch (aubio_timestretch_t * o UNUSED) { |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | aubio_timestretch_t * |
---|
[8688797] | 46 | new_aubio_timestretch (const char_t * method UNUSED, |
---|
[af195a5] | 47 | smpl_t pitchscale UNUSED, uint_t hop_size UNUSED, uint_t samplerate UNUSED) |
---|
| 48 | { |
---|
| 49 | AUBIO_ERR ("timestretch: aubio was not compiled with rubberband\n"); |
---|
| 50 | return NULL; |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | uint_t aubio_timestretch_set_stretch (aubio_timestretch_t * o UNUSED, smpl_t stretch UNUSED) |
---|
| 54 | { |
---|
| 55 | return AUBIO_FAIL; |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | smpl_t aubio_timestretch_get_stretch (aubio_timestretch_t * o UNUSED) |
---|
| 59 | { |
---|
| 60 | return 1.; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | uint_t aubio_timestretch_set_pitchscale (aubio_timestretch_t * o UNUSED, smpl_t pitchscale UNUSED) |
---|
| 64 | { |
---|
| 65 | return AUBIO_FAIL; |
---|
| 66 | } |
---|
| 67 | |
---|
[16965d5] | 68 | uint_t aubio_timestretch_get_samplerate (aubio_timestretch_t * o UNUSED) { |
---|
| 69 | return 0; |
---|
| 70 | } |
---|
| 71 | |
---|
[af195a5] | 72 | smpl_t aubio_timestretch_get_pitchscale (aubio_timestretch_t * o UNUSED) |
---|
| 73 | { |
---|
| 74 | return 1.; |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | uint_t aubio_timestretch_set_transpose (aubio_timestretch_t * o UNUSED, smpl_t transpose UNUSED) { |
---|
| 78 | return AUBIO_FAIL; |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | smpl_t aubio_timestretch_get_transpose (aubio_timestretch_t * o UNUSED) { |
---|
| 82 | return 0.; |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | uint_t aubio_timestretch_get_latency (aubio_timestretch_t * o UNUSED) { |
---|
| 86 | return 0.; |
---|
| 87 | } |
---|
| 88 | |
---|
[8688797] | 89 | uint_t aubio_timestretch_reset(aubio_timestretch_t *o UNUSED) { |
---|
| 90 | return AUBIO_FAIL; |
---|
| 91 | } |
---|
| 92 | |
---|
| 93 | sint_t aubio_timestretch_push(aubio_timestretch_t * o UNUSED, fvec_t * in |
---|
| 94 | UNUSED, uint_t length UNUSED) { |
---|
| 95 | return AUBIO_FAIL; |
---|
| 96 | } |
---|
| 97 | |
---|
| 98 | sint_t aubio_timestretch_get_available(aubio_timestretch_t * o UNUSED) { |
---|
[0d4228d] | 99 | return AUBIO_FAIL; |
---|
| 100 | } |
---|
[af195a5] | 101 | // end of dummy implementation |
---|
| 102 | |
---|
| 103 | #endif /* HAVE_RUBBERBAND */ |
---|