Skip to content

Commit c3ee29b

Browse files
committed
afilter/compressor: Workaround old GCC bug
1 parent eccc02f commit c3ee29b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/audio/filter/compressor.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ af_result_code compressor_filter(void *state, const audio_frame **f){
203203

204204
if(env > s->threshold){
205205
float reduction_dB = (1 / s->ratio - 1) * (env - s->threshold);
206-
float gain = std::powf(10, reduction_dB / 20.f);
206+
float gain = std::pow(10.f, reduction_dB / 20.f);
207207
sample_float *= gain;
208208
}
209209

210-
sample_float *= std::powf(10, s->makeup_gain / 20.f);
210+
sample_float *= std::pow(10.f, s->makeup_gain / 20.f);
211211
sample_float = std::clamp(sample_float, -1.0f, 1.0f);
212212
sample = sample_float * INT16_MAX;
213213
*reinterpret_cast<int16_t *>(frame->data + bps * i) = sample;

0 commit comments

Comments
 (0)