@@ -102,11 +102,11 @@ void SoundSynthesizerEffects::linearInterpolation(SoundEmojiSynthesizer *synth,
102102void SoundSynthesizerEffects::logarithmicInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
103103{
104104 // Original frequency gen here, for reference. -John
105- // synth->frequency = synth->effect->frequency+(log10 (context->step)*(context->parameter[0]-synth->effect->frequency)/1.95);
105+ // synth->frequency = synth->effect->frequency+(log10f (context->step)*(context->parameter[0]-synth->effect->frequency)/1.95);
106106
107- synth->frequency = synth->effect ->frequency +(log10 (
107+ synth->frequency = synth->effect ->frequency +(log10f (
108108 ( context->step ==0 ? 1 : context->step ) // This is a hack, to prevent step==0 from jumping this to extreme values. -John
109- )*(context->parameter [0 ]-synth->effect ->frequency )/1.95 );
109+ )*(context->parameter [0 ]-synth->effect ->frequency )/1 .95f );
110110
111111 // This is a bit of a hack, but will protect the synth for now until the math here can be fixed properly. -John
112112 if ( synth->frequency < 0 )
@@ -117,39 +117,39 @@ void SoundSynthesizerEffects::logarithmicInterpolation(SoundEmojiSynthesizer *sy
117117// parameter[0]: end frequency
118118void SoundSynthesizerEffects::curveInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
119119{
120- synth->frequency = (sin (context->step *3 .14159f /180 .0f )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
120+ synth->frequency = (sinf (context->step *3 .14159f /180 .0f )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
121121}
122122
123123// Cosine interpolate function
124124// parameter[0]: end frequency
125125void SoundSynthesizerEffects::slowVibratoInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context){
126- synth->frequency = sin (context->step /10 )*context->parameter [0 ]+synth->effect ->frequency ;
126+ synth->frequency = sinf (context->step /10 )*context->parameter [0 ]+synth->effect ->frequency ;
127127}
128128
129129// warble function
130130// parameter[0]: end frequency
131131void SoundSynthesizerEffects::warbleInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
132132{
133- synth->frequency = (sin (context->step )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
133+ synth->frequency = (sinf (context->step )*(context->parameter [0 ]-synth->effect ->frequency )+synth->effect ->frequency );
134134}
135135
136136// Vibrato function
137137// parameter[0]: end frequency
138138void SoundSynthesizerEffects::vibratoInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context){
139- synth->frequency = synth->effect ->frequency + sin (context->step )*context->parameter [0 ];
139+ synth->frequency = synth->effect ->frequency + sinf (context->step )*context->parameter [0 ];
140140}
141141
142142// Exponential rising function
143143// parameter[0]: end frequency
144144void SoundSynthesizerEffects::exponentialRisingInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
145145{
146- synth->frequency = synth->effect ->frequency + sin (0 .01745329f *context->step )*context->parameter [0 ];
146+ synth->frequency = synth->effect ->frequency + sinf (0 .01745329f *context->step )*context->parameter [0 ];
147147}
148148
149149// Exponential falling function
150150void SoundSynthesizerEffects::exponentialFallingInterpolation (SoundEmojiSynthesizer *synth, ToneEffect *context)
151151{
152- synth->frequency = synth->effect ->frequency + cos (0 .01745329f *context->step )*context->parameter [0 ];
152+ synth->frequency = synth->effect ->frequency + cosf (0 .01745329f *context->step )*context->parameter [0 ];
153153}
154154
155155// Argeppio functions
0 commit comments