fixed playback/export flickering and hanging
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "project/clip.h"
|
||||
#include "project/sequence.h"
|
||||
#include "debug.h"
|
||||
|
||||
ToneEffect::ToneEffect(Clip* c) : Effect(c, EFFECT_TYPE_AUDIO, AUDIO_TONE_EFFECT), sinX(INT_MIN) {
|
||||
type_val = add_row("Type:")->add_field(EFFECT_FIELD_COMBO);
|
||||
@@ -54,7 +55,7 @@ void ToneEffect::process_audio(double timecode_start, double timecode_end, quint
|
||||
int presin = sinX;
|
||||
sinX++;
|
||||
if (sinX < presin) {
|
||||
qDebug() << "[WARNING] Tone effect overflowed";
|
||||
dout << "[WARNING] Tone effect overflowed";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QtMath>
|
||||
#include <QDebug>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ui/labelslider.h"
|
||||
@@ -22,7 +21,6 @@ VolumeEffect::VolumeEffect(Clip* c) : Effect(c, EFFECT_TYPE_AUDIO, AUDIO_VOLUME_
|
||||
}
|
||||
|
||||
void VolumeEffect::process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int) {
|
||||
// qDebug() << timecode_start << timecode_end;
|
||||
double interval = (timecode_end-timecode_start)/nb_bytes;
|
||||
for (int i=0;i<nb_bytes;i+=2) {
|
||||
double vol_val = qSqrt(volume_val->get_double_value(timecode_start+(interval*i), true)*0.01);
|
||||
|
||||
Reference in New Issue
Block a user