Changeset 238

Show
Ignore:
Timestamp:
02/25/08 16:40:58 (4 years ago)
Author:
ath
Message:

Push the "rubbered" branch to master.

Location:
trunk
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/fm_server/src/fm_effect_rubber/Makefile.am

    r236 r238  
    1111libfm_effect_rubber_la_CPPFLAGS = \ 
    1212        $(GLIB_CFLAGS) \ 
     13        $(RGC_SERVER_CFLAGS) \ 
    1314        $(RUBBERBAND_CFLAGS) 
    1415 
     
    1617libfm_effect_rubber_la_LIBADD = \ 
    1718        $(GLIB_LIBS) \ 
     19        $(RGC_SERVER_LIBS) \ 
    1820        $(RUBBERBAND_LIBS) 
    1921 
  • trunk/fm_server/src/fm_effect_rubber/Makefile.in

    r236 r238  
    5050am__DEPENDENCIES_1 = 
    5151libfm_effect_rubber_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ 
    52         $(am__DEPENDENCIES_1) 
     52        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) 
    5353am_libfm_effect_rubber_la_OBJECTS =  \ 
    5454        libfm_effect_rubber_la-fm_rubber_wrapper.lo \ 
     
    245245libfm_effect_rubber_la_CPPFLAGS = \ 
    246246        $(GLIB_CFLAGS) \ 
     247        $(RGC_SERVER_CFLAGS) \ 
    247248        $(RUBBERBAND_CFLAGS) 
    248249 
    249250libfm_effect_rubber_la_LIBADD = \ 
    250251        $(GLIB_LIBS) \ 
     252        $(RGC_SERVER_LIBS) \ 
    251253        $(RUBBERBAND_LIBS) 
    252254 
  • trunk/fm_server/src/fm_effect_rubber/fm_effect_rubber.c

    r236 r238  
     1/* 
     2 *  FreeMix - sound server 
     3 *  Copyright (C) 2008 Alberto Botti <alberto.botti@yoda2000.net> 
     4 * 
     5 *  This program is free software; you can redistribute it and/or modify 
     6 *  it under the terms of the GNU General Public License as published by 
     7 *  the Free Software Foundation; either version 2 of the License, or 
     8 *  (at your option) any later version. 
     9 * 
     10 *  This program is distributed in the hope that it will be useful, 
     11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
     12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     13 *  GNU Library General Public License for more details. 
     14 * 
     15 *  You should have received a copy of the GNU General Public License 
     16 *  along with this program; if not, write to the Free Software 
     17 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
     18 * 
     19 * 
     20 *  fm_effect_rubber.c - time-stretching and pitch-shifting element based on 
     21 *                       the Rubber Band library 
     22 *                       http://breakfastquay.com/rubberband/ 
     23 *                       by Chris Cannam <cannam@all-day-breakfast.com> 
     24 */ 
     25 
     26 
     27#include <glib.h> 
     28#include <glib-object.h> 
     29#include <rgc_server.h> 
     30 
     31#include "../fm_buffer.h" 
     32#include "../fm_element.h" 
     33#include "../fm_input.h" 
     34#include "../fm_effect.h" 
     35#include "fm_rubber_wrapper.h" 
    136#include "fm_effect_rubber.h" 
    2 #include "fm_rubber_wrapper.h" 
    3  
    4 void test (void) 
    5 { 
    6         FmRubberWrapper *wr = fm_rubber_wrapper_new (); 
    7         fm_rubber_wrapper_reset (wr); 
    8 } 
     37 
     38 
     39enum { 
     40  PROP_0, 
     41  PROP_TIME_RATIO, 
     42  PROP_PITCH_SCALE 
     43}; 
     44 
     45 
     46static void fm_effect_rubber_class_init         (FmEffectRubberClass    *klass); 
     47static void fm_effect_rubber_init               (FmEffectRubber         *rubber); 
     48static gboolean fm_effect_rubber_activate       (FmElement              *element); 
     49static gboolean fm_effect_rubber_deactivate     (FmElement              *element); 
     50static void fm_effect_rubber_get_buffer         (FmElement              *element, 
     51                                                 FmBuffer               *buffer, 
     52                                                 FmSync                 *sync); 
     53static void fm_effect_rubber_set_property       (GObject                *object, 
     54                                                 guint                  prop_id, 
     55                                                 const GValue           *value, 
     56                                                 GParamSpec             *pspec); 
     57static void fm_effect_rubber_get_property       (GObject                *object, 
     58                                                 guint                  prop_id, 
     59                                                 GValue                 *value, 
     60                                                 GParamSpec             *pspec); 
     61static void fm_effect_rubber_dispose            (GObject                *object); 
     62static void fm_effect_rubber_finalize           (GObject                *object); 
     63 
     64 
     65static FmEffectClass *parent_class = NULL; 
     66 
     67 
     68GType 
     69fm_effect_rubber_get_type (void) 
     70{ 
     71        static GType effect_rubber_type = 0; 
     72 
     73        if (!effect_rubber_type) { 
     74                static const GTypeInfo effect_rubber_info = { 
     75                        sizeof (FmEffectRubberClass), 
     76                        NULL,           /* base_init */ 
     77                        NULL,           /* base_finalize */ 
     78                        (GClassInitFunc) fm_effect_rubber_class_init, 
     79                        NULL,           /* class_finalize */ 
     80                        NULL,           /* class_data */ 
     81                        sizeof (FmEffectRubber), 
     82                        0,              /* n_preallocs */ 
     83                        (GInstanceInitFunc) fm_effect_rubber_init 
     84                }; 
     85 
     86                effect_rubber_type = g_type_register_static (FM_TYPE_EFFECT, "FmEffectRubber", 
     87                                                           &effect_rubber_info, 0); 
     88        } 
     89 
     90        return (effect_rubber_type); 
     91} 
     92 
     93 
     94void 
     95fm_effect_rubber_class_register         (void) 
     96{ 
     97        rgc_class_register (FM_TYPE_EFFECT_RUBBER); 
     98} 
     99 
     100 
     101static void 
     102fm_effect_rubber_class_init             (FmEffectRubberClass    *klass) 
     103{ 
     104        GObjectClass *gobject_class = G_OBJECT_CLASS (klass); 
     105        FmElementClass *element_class = FM_ELEMENT_CLASS (klass); 
     106//      FmEffectClass *effect_class = FM_EFFECT_CLASS (klass); 
     107 
     108        parent_class = g_type_class_peek_parent (klass); 
     109 
     110        gobject_class->set_property = fm_effect_rubber_set_property; 
     111        gobject_class->get_property = fm_effect_rubber_get_property; 
     112        gobject_class->dispose = fm_effect_rubber_dispose; 
     113        gobject_class->finalize = fm_effect_rubber_finalize; 
     114 
     115        element_class->activate = fm_effect_rubber_activate; 
     116        element_class->deactivate = fm_effect_rubber_deactivate; 
     117        element_class->get_buffer = fm_effect_rubber_get_buffer; 
     118 
     119        g_object_class_install_property (gobject_class, 
     120                                         PROP_TIME_RATIO, 
     121                                         g_param_spec_double ("time_ratio", 
     122                                         "Time ratio", 
     123                                         "Time ratio", 
     124                                         (gdouble) 0.1, (gdouble) 10, 1, 
     125                                         G_PARAM_READWRITE)); 
     126 
     127        g_object_class_install_property (gobject_class, 
     128                                         PROP_PITCH_SCALE, 
     129                                         g_param_spec_double ("pitch_scale", 
     130                                         "Pitch scale", 
     131                                         "Pitch scale", 
     132                                         (gdouble) 0.1, (gdouble) 10, 1, 
     133                                         G_PARAM_READWRITE)); 
     134} 
     135 
     136 
     137static void 
     138fm_effect_rubber_init                   (FmEffectRubber         *rubber) 
     139{ 
     140        rubber->wrap = NULL; 
     141        rubber->temp_buffer = NULL; 
     142        rubber->time_ratio = 1.0; 
     143        rubber->pitch_scale = 1.0; 
     144        rubber->change_time_ratio = -1; 
     145        rubber->change_pitch_scale = -1; 
     146        rubber->channel_ptr = NULL; 
     147} 
     148 
     149 
     150FmEffectRubber * 
     151fm_effect_rubber_new                    (void) 
     152{ 
     153        return g_object_new (FM_TYPE_EFFECT_RUBBER, NULL); 
     154} 
     155 
     156 
     157static gboolean 
     158fm_effect_rubber_activate               (FmElement              *element) 
     159{ 
     160        FmEffectRubber *rubber = FM_EFFECT_RUBBER (element); 
     161 
     162        if (!fm_element_activate_connected (element)) 
     163                return FALSE; 
     164 
     165        rubber->wrap = fm_rubber_wrapper_new (); 
     166        rubber->temp_buffer = fm_buffer_new (16384, FM_CHANNELS_STEREO); 
     167        rubber->channel_ptr = g_new (gfloat *, FM_CHANNELS_STEREO); 
     168 
     169        return TRUE; 
     170} 
     171 
     172 
     173static gboolean 
     174fm_effect_rubber_deactivate             (FmElement              *element) 
     175{ 
     176        FmEffectRubber *rubber = FM_EFFECT_RUBBER (element); 
     177 
     178        g_free (rubber->channel_ptr); 
     179        fm_buffer_destroy (rubber->temp_buffer); 
     180        fm_rubber_wrapper_destroy (rubber->wrap); 
     181 
     182        return TRUE; 
     183} 
     184 
     185 
     186static void 
     187fm_effect_rubber_get_buffer             (FmElement              *element, 
     188                                         FmBuffer               *buffer, 
     189                                         FmSync                 *sync) 
     190{ 
     191        FmEffectRubber *rubber = FM_EFFECT_RUBBER (element); 
     192        int i; 
     193 
     194        /*g_print ("Requested %u\n", buffer->requested_samples); 
     195        fm_element_get_buffer_from_src (element, buffer, sync); 
     196        g_print ("Used %u\n", buffer->used_samples); 
     197        return;*/ 
     198 
     199        if (rubber->change_time_ratio > -1) { 
     200                fm_rubber_wrapper_set_time_ratio (rubber->wrap, rubber->change_time_ratio); 
     201                rubber->time_ratio = rubber->change_time_ratio; 
     202                rubber->change_time_ratio = -1; 
     203        } 
     204 
     205        if (rubber->change_pitch_scale > -1) { 
     206                fm_rubber_wrapper_set_pitch_scale (rubber->wrap, rubber->change_pitch_scale); 
     207                rubber->pitch_scale = rubber->change_pitch_scale; 
     208                rubber->change_pitch_scale = -1; 
     209        } 
     210 
     211        for (i = 0; i < FM_CHANNELS_STEREO; i++) 
     212                rubber->channel_ptr[i] = buffer->channel_data[i]; 
     213 
     214        guint samples_needed = buffer->requested_samples; 
     215 
     216        while (samples_needed > 0) { 
     217                guint samples_avail = fm_rubber_wrapper_available (rubber->wrap); 
     218 
     219                if (samples_avail) { 
     220                        guint ask_for = samples_avail; 
     221 
     222                        if (ask_for > samples_needed) 
     223                                ask_for = samples_needed; 
     224 
     225                        guint retrieved = fm_rubber_wrapper_retrieve (rubber->wrap, rubber->channel_ptr, ask_for); 
     226                        samples_needed -= retrieved; 
     227                         
     228                        for (i = 0; i < FM_CHANNELS_STEREO; i++) 
     229                                rubber->channel_ptr[i] += retrieved; 
     230 
     231                        if (retrieved != ask_for) 
     232                                g_warning ("Asked for %u, returned %u", ask_for, retrieved); 
     233                         
     234                } else { 
     235                        /* ask for another buffer from our source */ 
     236                        guint samples_req = fm_rubber_wrapper_get_samples_required (rubber->wrap); 
     237 
     238                        rubber->temp_buffer->requested_samples = samples_req; 
     239 
     240                        fm_element_get_buffer_from_src (element, rubber->temp_buffer, sync); 
     241 
     242                        fm_rubber_wrapper_process (rubber->wrap, rubber->temp_buffer->channel_data, samples_req, FALSE); 
     243                } 
     244 
     245        } 
     246} 
     247 
     248 
     249static void 
     250fm_effect_rubber_set_property           (GObject        *object, 
     251                                         guint          prop_id, 
     252                                         const GValue   *value, 
     253                                         GParamSpec     *pspec) 
     254{ 
     255        FmEffectRubber *rubber = FM_EFFECT_RUBBER (object); 
     256 
     257        switch (prop_id) { 
     258                case PROP_TIME_RATIO: 
     259                        fm_effect_rubber_set_time_ratio (rubber, g_value_get_double (value)); 
     260                        break; 
     261                case PROP_PITCH_SCALE: 
     262                        fm_effect_rubber_set_pitch_scale (rubber, g_value_get_double (value)); 
     263                        break; 
     264                default: 
     265                        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 
     266                        break; 
     267        } 
     268} 
     269 
     270 
     271static void 
     272fm_effect_rubber_get_property           (GObject        *object, 
     273                                         guint          prop_id, 
     274                                         GValue         *value, 
     275                                         GParamSpec     *pspec) 
     276{ 
     277        FmEffectRubber *rubber = FM_EFFECT_RUBBER (object); 
     278 
     279        switch (prop_id) { 
     280                case PROP_TIME_RATIO: 
     281                        g_value_set_double (value, rubber->time_ratio); 
     282                        break; 
     283                case PROP_PITCH_SCALE: 
     284                        g_value_set_double (value, rubber->pitch_scale); 
     285                        break; 
     286                default: 
     287                        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 
     288                        break; 
     289        } 
     290} 
     291 
     292 
     293void 
     294fm_effect_rubber_set_time_ratio         (FmEffectRubber         *rubber, 
     295                                         gdouble                ratio) 
     296{ 
     297        rubber->change_time_ratio = ratio; 
     298} 
     299 
     300 
     301gdouble 
     302fm_effect_rubber_get_time_ratio         (FmEffectRubber         *rubber) 
     303{ 
     304        return (rubber->time_ratio); 
     305} 
     306 
     307 
     308void 
     309fm_effect_rubber_set_pitch_scale        (FmEffectRubber         *rubber, 
     310                                         gdouble                scale) 
     311{ 
     312        rubber->change_pitch_scale = scale; 
     313} 
     314 
     315 
     316gdouble 
     317fm_effect_rubber_get_pitch_scale        (FmEffectRubber         *rubber) 
     318{ 
     319        return (rubber->pitch_scale); 
     320} 
     321 
     322 
     323static void 
     324fm_effect_rubber_dispose                (GObject                *object) 
     325{ 
     326        G_OBJECT_CLASS (parent_class)->dispose (object); 
     327} 
     328 
     329 
     330static void 
     331fm_effect_rubber_finalize               (GObject                *object) 
     332{ 
     333        G_OBJECT_CLASS (parent_class)->finalize (object); 
     334} 
  • trunk/fm_server/src/fm_effect_rubber/fm_effect_rubber.h

    r236 r238  
     1/* 
     2 *  FreeMix - sound server 
     3 *  Copyright (C) 2008 Alberto Botti <alberto.botti@yoda2000.net> 
     4 * 
     5 *  This program is free software; you can redistribute it and/or modify 
     6 *  it under the terms of the GNU General Public License as published by 
     7 *  the Free Software Foundation; either version 2 of the License, or 
     8 *  (at your option) any later version. 
     9 * 
     10 *  This program is distributed in the hope that it will be useful, 
     11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
     12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     13 *  GNU Library General Public License for more details. 
     14 * 
     15 *  You should have received a copy of the GNU General Public License 
     16 *  along with this program; if not, write to the Free Software 
     17 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
     18 * 
     19 * 
     20 *  fm_effect_rubber.h - time-stretching and pitch-shifting element based on 
     21 *                       the Rubber Band library 
     22 *                       http://breakfastquay.com/rubberband/ 
     23 *                       by Chris Cannam <cannam@all-day-breakfast.com> 
     24 */ 
     25 
     26 
     27#define FM_TYPE_EFFECT_RUBBER                   (fm_effect_rubber_get_type ()) 
     28#define FM_EFFECT_RUBBER(obj)                   (G_TYPE_CHECK_INSTANCE_CAST ((obj), FM_TYPE_EFFECT_RUBBER, FmEffectRubber)) 
     29#define FM_EFFECT_RUBBER_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), FM_TYPE_EFFECT_RUBBER, FmEffectRubberClass)) 
     30#define FM_IS_EFFECT_RUBBER(obj)                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FM_TYPE_EFFECT_RUBBER)) 
     31#define FM_IS_EFFECT_RUBBER_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((klass), FM_TYPE_EFFECT_RUBBER)) 
     32#define FM_EFFECT_RUBBER_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), FM_TYPE_EFFECT_RUBBER, FmEffectRubberClass)) 
     33 
     34 
     35typedef struct _FmEffectRubber FmEffectRubber; 
     36typedef struct _FmEffectRubberClass FmEffectRubberClass; 
     37 
     38struct _FmEffectRubber 
     39{ 
     40        FmEffect effect; 
     41 
     42        FmRubberWrapper *wrap; 
     43 
     44        FmBuffer *temp_buffer; 
     45 
     46        gfloat **channel_ptr; 
     47 
     48        gdouble time_ratio; 
     49        gdouble pitch_scale; 
     50 
     51        gdouble change_time_ratio; 
     52        gdouble change_pitch_scale; 
     53}; 
     54 
     55struct _FmEffectRubberClass 
     56{ 
     57        FmEffectClass parent_class; 
     58}; 
     59 
     60 
     61GType 
     62fm_effect_rubber_get_type               (void) G_GNUC_CONST; 
     63 
     64void 
     65fm_effect_rubber_class_register         (void); 
     66 
     67FmEffectRubber * 
     68fm_effect_rubber_new                    (void); 
     69 
     70void 
     71fm_effect_rubber_set_time_ratio         (FmEffectRubber         *rubber, 
     72                                         gdouble                ratio); 
     73 
     74gdouble 
     75fm_effect_rubber_get_time_ratio         (FmEffectRubber         *rubber); 
     76 
     77void 
     78fm_effect_rubber_set_pitch_scale        (FmEffectRubber         *rubber, 
     79                                         gdouble                scale); 
     80 
     81gdouble 
     82fm_effect_rubber_get_pitch_scale        (FmEffectRubber         *rubber); 
  • trunk/fm_server/src/fm_effect_rubber/fm_rubber_wrapper.cpp

    r236 r238  
    1111*fm_rubber_wrapper_new                  (void) 
    1212{ 
     13        g_print ("RRRRRRRRRUUUUUUUBBBBBBBEEEEEEERRRRRR\n"); 
     14 
    1315        FmRubberWrapper *wrap = g_new0 (FmRubberWrapper, 1); 
    1416        RubberBandStretcher *ts = new RubberBandStretcher (44100, 2, RubberBandStretcher::OptionProcessRealTime, 1.0, 1.0); 
    1517        wrap->ts = ts; 
     18 
     19        return wrap; 
    1620} 
    1721 
     
    4448 
    4549size_t 
     50fm_rubber_wrapper_get_samples_required  (FmRubberWrapper        *wrap) 
     51{ 
     52        RubberBandStretcher *ts = (RubberBandStretcher *) wrap->ts; 
     53        return ts->getSamplesRequired (); 
     54} 
     55 
     56 
     57size_t 
    4658fm_rubber_wrapper_get_latency           (FmRubberWrapper        *wrap) 
    4759{ 
     
    5365void 
    5466fm_rubber_wrapper_process               (FmRubberWrapper        *wrap, 
    55                                          const float            *input, 
     67                                         float                  **input, 
    5668                                         size_t                 samples, 
    5769                                         gboolean               final) 
     
    7284size_t 
    7385fm_rubber_wrapper_retrieve              (FmRubberWrapper        *wrap, 
    74                                          float *const           *output, 
     86                                         float                  **output, 
    7587                                         size_t                 samples)  
    7688{ 
    7789        RubberBandStretcher *ts = (RubberBandStretcher *) wrap->ts; 
    78         return ts->retrieve (output, samples); 
     90        return ts->retrieve ((float* const*) output, samples); 
    7991} 
    8092 
    8193 
    8294void 
    83 fm_rubber_destroy                       (FmRubberWrapper        *wrap) 
     95fm_rubber_wrapper_destroy               (FmRubberWrapper        *wrap) 
    8496{ 
    8597        RubberBandStretcher *ts = (RubberBandStretcher *) wrap->ts; 
  • trunk/fm_server/src/fm_effect_rubber/fm_rubber_wrapper.h

    r236 r238  
    2525                                         double                 scale); 
    2626 
     27size_t 
     28fm_rubber_wrapper_get_latency           (FmRubberWrapper        *wrap); 
     29 
     30size_t 
     31fm_rubber_wrapper_get_samples_required  (FmRubberWrapper        *wrap); 
     32 
     33void 
     34fm_rubber_wrapper_process               (FmRubberWrapper        *wrap, 
     35                                         float                  **input, 
     36                                         size_t                 samples, 
     37                                         gboolean               final); 
     38 
     39int 
     40fm_rubber_wrapper_available             (FmRubberWrapper        *wrap); 
     41 
     42size_t 
     43fm_rubber_wrapper_retrieve              (FmRubberWrapper        *wrap, 
     44                                         float                  **output, 
     45                                         size_t                 samples); 
     46 
     47void 
     48fm_rubber_wrapper_destroy               (FmRubberWrapper        *wrap); 
     49 
    2750 
    2851#ifdef __cplusplus 
  • trunk/fm_server/src/fm_input_cdj.c

    r196 r238  
    3131#include "fm_input_gst/fm_input_gst_common.h" 
    3232#include "fm_input_gst/fm_input_gst.h" 
    33 #include "fm_effect_rate.h" 
     33//#include "fm_effect_rate.h" 
     34#include "fm_effect_rubber/fm_rubber_wrapper.h" 
     35#include "fm_effect_rubber/fm_effect_rubber.h" 
    3436#include "fm_output.h" 
    3537#include "fm_sync.h" 
     
    191193{ 
    192194        input_cdj->input = fm_input_gst_new (); 
    193         input_cdj->rate = fm_effect_rate_new (); 
     195        input_cdj->rate = fm_effect_rubber_new (); 
    194196 
    195197        fm_element_connect_src (FM_ELEMENT (input_cdj->rate), FM_ELEMENT (input_cdj->input)); 
     
    215217        switch (prop_id) { 
    216218                case PROP_RATE: 
    217                         fm_effect_rate_set_rate (input_cdj->rate, g_value_get_double (value)); 
     219                        fm_effect_rubber_set_time_ratio (input_cdj->rate, g_value_get_double (value)); 
    218220                        fm_input_cdj_update_bpm (input_cdj); 
    219221                        break; 
     
    237239        switch (prop_id) { 
    238240                case PROP_RATE: 
    239                         g_value_set_double (value, fm_effect_rate_get_rate (input_cdj->rate)); 
     241                        g_value_set_double (value, fm_effect_rubber_get_time_ratio (input_cdj->rate)); 
    240242                        break; 
    241243                default: 
     
    303305 
    304306         
    305 //      fm_element_get_buffer (FM_ELEMENT (input_cdj->rate), buffer, sync); 
    306         fm_element_get_buffer (FM_ELEMENT (input_cdj->input), buffer, sync); 
     307        fm_element_get_buffer (FM_ELEMENT (input_cdj->rate), buffer, sync); 
     308//      fm_element_get_buffer (FM_ELEMENT (input_cdj->input), buffer, sync); 
    307309//      g_print ("went %lld nsec ahead\n", (long long int) FM_BUFFER_DURATION (buffer)); 
    308310 
     
    383385        gdouble bpm; 
    384386        if (input_cdj->beat_section) 
    385                 bpm = input_cdj->beat_section->bpm / fm_effect_rate_get_rate (input_cdj->rate); 
     387                bpm = input_cdj->beat_section->bpm / fm_effect_rubber_get_time_ratio (input_cdj->rate); 
    386388        else 
    387389                bpm = 0; 
  • trunk/fm_server/src/fm_input_cdj.h

    r133 r238  
    3636         
    3737        FmInputGst      *input; 
    38         FmEffectRate    *rate; 
     38        FmEffectRubber  *rate; 
    3939 
    4040        FmBeatSection   *beat_section; 
  • trunk/fm_server/src/main.c

    r224 r238  
    5757void fm_effect_gain_class_register (void); 
    5858void fm_effect_rate_class_register (void); 
     59void fm_effect_rubber_class_register (void); 
    5960void fm_effect_pan_class_register (void); 
    6061void fm_input_gst_class_register (void); 
     
    125126        fm_effect_gain_class_register (); 
    126127        fm_effect_rate_class_register (); 
     128        fm_effect_rubber_class_register (); 
    127129        fm_input_gst_class_register (); 
    128130        fm_input_cdj_class_register (); 
  • trunk/rubberband/rubberband.pc.in

    r236 r238  
    22exec_prefix=@exec_prefix@ 
    33libdir=@libdir@ 
    4 includedir=@includedir@ 
     4includedir=@includedir@/rubberband 
    55 
    66Name: rubberband 
     
    99Requires: fftw3, samplerate 
    1010Libs: -L@libdir@ -lrubberband 
    11 Cflags: -I@includedir@ 
     11Cflags: -I@includedir@/rubberband