[beast] BSE: compile bsemathsignal as C++ source



commit d52a62beab16af3b75d4a19a500cac25d298df00
Author: Stefan Westerfeld <stefan space twc de>
Date:   Fri Aug 5 16:32:24 2011 +0200

    BSE: compile bsemathsignal as C++ source

 bse/Makefile.am                           |    2 +-
 bse/{bsemathsignal.c => bsemathsignal.cc} |   14 +++++++-------
 bse/bsemathsignal.h                       |    4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/bse/Makefile.am b/bse/Makefile.am
index 5d9fefc..e148535 100644
--- a/bse/Makefile.am
+++ b/bse/Makefile.am
@@ -72,7 +72,7 @@ bse_sources = $(strip \
 	bseconstant.cc		bseconstvalues.cc	bsecontainer.cc			bsecontextmerger.cc \
 	bsedatapocket.cc	bseeditablesample.cc	bseenums.cc			bsegconfig.cc \
 	bseglobals.cc		bseglue.cc		bseitem.cc			bsejanitor.cc \
-	bsemain.cc		bsemath.cc		bsemathsignal.c			bseladspa.cc \
+	bsemain.cc		bsemath.cc		bsemathsignal.cc		bseladspa.cc \
 	bsemidicontroller.c	bsemididevice.c 	bsedevice.cc 			\
 	bsemididevice-null.c	bsemididevice-oss.c	bsemidievent.c			bsemidinotifier.c \
 	bsemidireceiver.cc	bsemidisynth.c		bseobject.c			bsepart.c \
diff --git a/bse/bsemathsignal.c b/bse/bsemathsignal.cc
similarity index 99%
rename from bse/bsemathsignal.c
rename to bse/bsemathsignal.cc
index 4c21538..0a977c4 100644
--- a/bse/bsemathsignal.c
+++ b/bse/bsemathsignal.cc
@@ -21,12 +21,12 @@
 /* --- frequency modulation --- */
 void
 bse_frequency_modulator (const BseFrequencyModulator *fm,
-			 guint                        n_values,
-			 const gfloat                *ifreq,
-			 const gfloat                *ifmod,
-			 gfloat                      *fm_buffer)
+			 uint                         n_values,
+			 const float                 *ifreq,
+			 const float                 *ifmod,
+			 float                       *fm_buffer)
 {
-  gfloat *bound, fine_tune, fm_strength;
+  float *bound, fine_tune, fm_strength;
   gboolean with_fine_tune;
 
   fine_tune = bse_cent_tune_fast (fm->fine_tune);
@@ -61,7 +61,7 @@ bse_frequency_modulator (const BseFrequencyModulator *fm,
     }
   else if (ifmod)
     {
-      gfloat signal_freq = fm->signal_freq * fine_tune;
+      float signal_freq = fm->signal_freq * fine_tune;
 
       if (fm->exponential_fm)
 	do {
@@ -85,7 +85,7 @@ bse_frequency_modulator (const BseFrequencyModulator *fm,
     }
   else
     {
-      gfloat signal_freq = fm->signal_freq * fine_tune;
+      float signal_freq = fm->signal_freq * fine_tune;
 
       do {
 	*fm_buffer++ = signal_freq;
diff --git a/bse/bsemathsignal.h b/bse/bsemathsignal.h
index d67c02d..6c8c78b 100644
--- a/bse/bsemathsignal.h
+++ b/bse/bsemathsignal.h
@@ -717,11 +717,11 @@ bse_saturate_branching (double value,
 
 void    _bse_init_signal (void);
 
+extern const double * const bse_cent_table;
+
 static inline double G_GNUC_CONST
 bse_cent_tune_fast (int fine_tune)
 {
-  extern const double * const bse_cent_table;
-
   return bse_cent_table[CLAMP (fine_tune, -100, 100)];
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]