[Freeswitch-svn] [commit] r5295 - freeswitch/trunk/libs/libteletone/src

Freeswitch SVN mikej at freeswitch.org
Fri Jun 8 12:15:03 EDT 2007


Author: mikej
Date: Fri Jun  8 12:15:03 2007
New Revision: 5295

Modified:
   freeswitch/trunk/libs/libteletone/src/libteletone_generate.h

Log:
solaris requires us to use inline not __inline__

Modified: freeswitch/trunk/libs/libteletone/src/libteletone_generate.h
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_generate.h	(original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_generate.h	Fri Jun  8 12:15:03 2007
@@ -80,9 +80,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef _MSC_VER
-#ifndef __inline__
-#define __inline__ __inline
-#endif
+#undef inline
+#define inline __inline
 typedef unsigned __int64 uint64_t;
 typedef unsigned __int32 uint32_t;
 typedef unsigned __int16 uint16_t;
@@ -131,7 +130,7 @@
 
 extern int16_t TELETONE_SINES[SINE_TABLE_MAX];
 
-static __inline__ int16_t teletone_dds_modulate_sample(teletone_dds_state_t *dds)
+static inline int16_t teletone_dds_modulate_sample(teletone_dds_state_t *dds)
 {
     int32_t bitmask = dds->phase_accumulator, sine_index = (bitmask >>= 23) & SINE_TABLE_LEN;
 	int16_t sample;
@@ -151,12 +150,12 @@
     return (int16_t) (sample * dds->scale_factor >> 15);
 }
 
-static __inline__ void teletone_dds_state_set_tx_level(teletone_dds_state_t *dds, float tx_level)
+static inline void teletone_dds_state_set_tx_level(teletone_dds_state_t *dds, float tx_level)
 {
 	dds->scale_factor = (int) (powf(10.0f, (tx_level - DBM0_MAX_POWER) / 20.0f) * (32767.0f * 1.414214f));
 }
 
-static __inline__ void teletone_dds_state_set_tone(teletone_dds_state_t *dds, teletone_process_t tone, uint32_t rate, float tx_level)
+static inline void teletone_dds_state_set_tone(teletone_dds_state_t *dds, teletone_process_t tone, uint32_t rate, float tx_level)
 {
 	dds->phase_accumulator = 0;
 	dds->phase_rate = (int32_t) ((tone * MAX_PHASE_ACCUMULATOR) / rate);



More information about the Freeswitch-svn mailing list