a m a z i n g new effects API

This commit is contained in:
itsmattkc
2018-08-20 00:04:35 +10:00
parent 14648d2e51
commit 5fc4a42db2
15 changed files with 30 additions and 59 deletions
-8
View File
@@ -20,14 +20,6 @@ PanEffect::PanEffect(Clip* c) : Effect(c, EFFECT_TYPE_AUDIO, AUDIO_PAN_EFFECT) {
connect(pan_val, SIGNAL(changed()), this, SLOT(field_changed()));
}
void PanEffect::refresh() {}
Effect* PanEffect::copy(Clip* c) {
PanEffect* p = new PanEffect(c);
copy_field_keyframes(p);
return p;
}
void PanEffect::process_audio(quint8 *samples, int nb_bytes) {
double pval = pan_val->get_double_value(-1);
if (pval != 0) {
+2 -4
View File
@@ -5,10 +5,8 @@
class PanEffect : public Effect {
public:
PanEffect(Clip* c);
void refresh();
void process_audio(quint8* samples, int nb_bytes);
Effect* copy(Clip* c);
PanEffect(Clip* c);
void process_audio(quint8* samples, int nb_bytes);
EffectField* pan_val;
};
-8
View File
@@ -21,14 +21,6 @@ VolumeEffect::VolumeEffect(Clip* c) : Effect(c, EFFECT_TYPE_AUDIO, AUDIO_VOLUME_
connect(volume_val, SIGNAL(changed()), this, SLOT(field_changed()));
}
void VolumeEffect::refresh() {}
Effect* VolumeEffect::copy(Clip* c) {
VolumeEffect* v = new VolumeEffect(c);
copy_field_keyframes(v);
return v;
}
void VolumeEffect::process_audio(quint8* samples, int nb_bytes) {
double vol_val = volume_val->get_double_value(-1);
if (vol_val != 100) {
+2 -4
View File
@@ -5,10 +5,8 @@
class VolumeEffect : public Effect {
public:
VolumeEffect(Clip* c);
void refresh();
void process_audio(quint8* samples, int nb_bytes);
Effect* copy(Clip* c);
VolumeEffect(Clip* c);
void process_audio(quint8* samples, int nb_bytes);
EffectField* volume_val;
};