don't use logarithmic algorithm for db volume
This commit is contained in:
@@ -20,7 +20,8 @@ VolumeEffect::VolumeEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
||||
void VolumeEffect::process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int) {
|
||||
double interval = (timecode_end-timecode_start)/nb_bytes;
|
||||
for (int i=0;i<nb_bytes;i+=4) {
|
||||
double vol_val = log_volume(volume_val->get_double_value(timecode_start+(interval*i), true));
|
||||
// double vol_val = log_volume(volume_val->get_double_value(timecode_start+(interval*i), true));
|
||||
double vol_val = volume_val->get_double_value(timecode_start+(interval*i), true);
|
||||
|
||||
qint32 right_samp = qint16(((samples[i+3] & 0xFF) << 8) | (samples[i+2] & 0xFF));
|
||||
qint32 left_samp = qint16(((samples[i+1] & 0xFF) << 8) | (samples[i] & 0xFF));
|
||||
|
||||
Reference in New Issue
Block a user