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 "aubio_priv.h" |
---|
22 | |
---|
23 | #ifndef HAVE_RUBBERBAND |
---|
24 | |
---|
25 | #include "fvec.h" |
---|
26 | #include "effects/timestretch.h" |
---|
27 | |
---|
28 | // TODO fallback time stretching implementation |
---|
29 | |
---|
30 | struct _aubio_timestretch_t |
---|
31 | { |
---|
32 | void *dummy; |
---|
33 | }; |
---|
34 | |
---|
35 | void |
---|
36 | aubio_timestretch_do (aubio_timestretch_t * o UNUSED, fvec_t * out UNUSED, |
---|
37 | uint_t * read UNUSED) |
---|
38 | { |
---|
39 | } |
---|
40 | |
---|
41 | void del_aubio_timestretch (aubio_timestretch_t * o UNUSED) { |
---|
42 | } |
---|
43 | |
---|
44 | aubio_timestretch_t * |
---|
45 | new_aubio_timestretch (const char_t * method UNUSED, |
---|
46 | smpl_t pitchscale UNUSED, uint_t hop_size UNUSED, uint_t samplerate UNUSED) |
---|
47 | { |
---|
48 | AUBIO_ERR ("timestretch: aubio was not compiled with rubberband\n"); |
---|
49 | return NULL; |
---|
50 | } |
---|
51 | |
---|
52 | uint_t aubio_timestretch_set_stretch (aubio_timestretch_t * o UNUSED, smpl_t stretch UNUSED) |
---|
53 | { |
---|
54 | return AUBIO_FAIL; |
---|
55 | } |
---|
56 | |
---|
57 | smpl_t aubio_timestretch_get_stretch (aubio_timestretch_t * o UNUSED) |
---|
58 | { |
---|
59 | return 1.; |
---|
60 | } |
---|
61 | |
---|
62 | uint_t aubio_timestretch_set_pitchscale (aubio_timestretch_t * o UNUSED, smpl_t pitchscale UNUSED) |
---|
63 | { |
---|
64 | return AUBIO_FAIL; |
---|
65 | } |
---|
66 | |
---|
67 | uint_t aubio_timestretch_get_samplerate (aubio_timestretch_t * o UNUSED) { |
---|
68 | return 0; |
---|
69 | } |
---|
70 | |
---|
71 | smpl_t aubio_timestretch_get_pitchscale (aubio_timestretch_t * o UNUSED) |
---|
72 | { |
---|
73 | return 1.; |
---|
74 | } |
---|
75 | |
---|
76 | uint_t aubio_timestretch_set_transpose (aubio_timestretch_t * o UNUSED, smpl_t transpose UNUSED) { |
---|
77 | return AUBIO_FAIL; |
---|
78 | } |
---|
79 | |
---|
80 | smpl_t aubio_timestretch_get_transpose (aubio_timestretch_t * o UNUSED) { |
---|
81 | return 0.; |
---|
82 | } |
---|
83 | |
---|
84 | uint_t aubio_timestretch_get_latency (aubio_timestretch_t * o UNUSED) { |
---|
85 | return 0.; |
---|
86 | } |
---|
87 | |
---|
88 | uint_t aubio_timestretch_reset(aubio_timestretch_t *o UNUSED) { |
---|
89 | return AUBIO_FAIL; |
---|
90 | } |
---|
91 | |
---|
92 | sint_t aubio_timestretch_push(aubio_timestretch_t * o UNUSED, fvec_t * in |
---|
93 | UNUSED, uint_t length UNUSED) { |
---|
94 | return AUBIO_FAIL; |
---|
95 | } |
---|
96 | |
---|
97 | sint_t aubio_timestretch_get_available(aubio_timestretch_t * o UNUSED) { |
---|
98 | return AUBIO_FAIL; |
---|
99 | } |
---|
100 | // end of dummy implementation |
---|
101 | |
---|
102 | #endif /* HAVE_RUBBERBAND */ |
---|