changed icon
This commit is contained in:
@@ -33,8 +33,8 @@ void AudioNoiseEffect::process_audio(double timecode_start, double timecode_end,
|
||||
if (mix_val->get_bool_value(timecode)) {
|
||||
qint16 left_sample = (qint16) (((samples[i+1] & 0xFF) << 8) | (samples[i] & 0xFF));
|
||||
qint16 right_sample = (qint16) (((samples[i+3] & 0xFF) << 8) | (samples[i+2] & 0xFF));
|
||||
left_noise_sample = mixAudioSample(left_noise_sample, left_sample);
|
||||
right_noise_sample = mixAudioSample(right_noise_sample, right_sample);
|
||||
left_noise_sample = mix_audio_sample(left_noise_sample, left_sample);
|
||||
right_noise_sample = mix_audio_sample(right_noise_sample, right_sample);
|
||||
}
|
||||
|
||||
samples[i+3] = (quint8) (right_noise_sample >> 8);
|
||||
|
||||
@@ -42,8 +42,8 @@ void ToneEffect::process_audio(double timecode_start, double timecode_end, quint
|
||||
if (mix_val->get_bool_value(timecode)) {
|
||||
qint16 left_sample = (qint16) (((samples[i+1] & 0xFF) << 8) | (samples[i] & 0xFF));
|
||||
qint16 right_sample = (qint16) (((samples[i+3] & 0xFF) << 8) | (samples[i+2] & 0xFF));
|
||||
left_tone_sample = mixAudioSample(left_tone_sample, left_sample);
|
||||
right_tone_sample = mixAudioSample(right_tone_sample, right_sample);
|
||||
left_tone_sample = mix_audio_sample(left_tone_sample, left_sample);
|
||||
right_tone_sample = mix_audio_sample(right_tone_sample, right_sample);
|
||||
}
|
||||
|
||||
samples[i+3] = (quint8) (right_tone_sample >> 8);
|
||||
|
||||
+1
-1
@@ -835,7 +835,7 @@ void EffectField::set_color_value(QColor color) {
|
||||
static_cast<ColorButton*>(ui_element)->set_color(color);
|
||||
}
|
||||
|
||||
qint16 mixAudioSample(qint16 a, qint16 b) {
|
||||
qint16 mix_audio_sample(qint16 a, qint16 b) {
|
||||
qint32 mixed_sample = static_cast<qint32>(a) + static_cast<qint32>(b);
|
||||
mixed_sample = qMax(qMin(mixed_sample, static_cast<qint32>(INT16_MAX)), static_cast<qint32>(INT16_MIN));
|
||||
return static_cast<qint16>(mixed_sample);
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ struct GLTextureCoords {
|
||||
double textureBottomLeftY;
|
||||
};
|
||||
|
||||
qint16 mixAudioSample(qint16 a, qint16 b);
|
||||
qint16 mix_audio_sample(qint16 a, qint16 b);
|
||||
|
||||
class EffectField : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -9,7 +9,6 @@
|
||||
<file>arrow.png</file>
|
||||
<file>beam.png</file>
|
||||
<file>razor.png</file>
|
||||
<file>full-icon.png</file>
|
||||
<file>audiosource.png</file>
|
||||
<file>videosource.png</file>
|
||||
<file>ripple.png</file>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 122 KiB |
+1
-7
@@ -13,10 +13,6 @@
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="icons/icons.qrc">
|
||||
<normaloff>:/icons/full-icon.png</normaloff>:/icons/full-icon.png</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
@@ -791,8 +787,6 @@
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="icons/icons.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
+4
-1
@@ -169,7 +169,7 @@ void cache_audio_worker(Clip* c, Clip* nest) {
|
||||
int lower_byte_index = (c->audio_buffer_write)%audio_ibuffer_size;
|
||||
qint16 old_sample = static_cast<qint16>((audio_ibuffer[upper_byte_index] & 0xFF) << 8 | (audio_ibuffer[lower_byte_index] & 0xFF));
|
||||
qint16 new_sample = static_cast<qint16>((frame->data[0][c->frame_sample_index+1] & 0xFF) << 8 | (frame->data[0][c->frame_sample_index] & 0xFF));
|
||||
qint16 mixed_sample = mixAudioSample(old_sample, new_sample);
|
||||
qint16 mixed_sample = mix_audio_sample(old_sample, new_sample);
|
||||
|
||||
audio_ibuffer[upper_byte_index] = static_cast<quint8>((mixed_sample >> 8) & 0xFF);
|
||||
audio_ibuffer[lower_byte_index] = static_cast<quint8>(mixed_sample & 0xFF);
|
||||
@@ -234,6 +234,7 @@ void reset_cache(Clip* c, long target_frame) {
|
||||
if (c->stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
// seeks to nearest keyframe (target_frame represents internal clip frame)
|
||||
|
||||
qint64 seek_start = QDateTime::currentMSecsSinceEpoch();
|
||||
av_seek_frame(c->formatCtx, ms->file_index, (int64_t) qFloor(clip_frame_to_seconds(c, target_frame) / timebase), AVSEEK_FLAG_BACKWARD);
|
||||
|
||||
// play up to the frame we actually want
|
||||
@@ -248,6 +249,8 @@ void reset_cache(Clip* c, long target_frame) {
|
||||
}
|
||||
} while (retrieved_frame < target_frame);
|
||||
|
||||
stat_seek_time = (QDateTime::currentMSecsSinceEpoch() - seek_start);
|
||||
|
||||
av_frame_free(&temp);
|
||||
} else if (c->stream->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
// seek (target_frame represents timeline timecode in frames, not clip timecode)
|
||||
|
||||
@@ -112,6 +112,10 @@ struct Clip
|
||||
bool audio_reset;
|
||||
bool audio_just_reset;
|
||||
long audio_target_frame;
|
||||
|
||||
// statistics
|
||||
int stat_seek_time;
|
||||
int stat_read_time;
|
||||
};
|
||||
|
||||
#endif // CLIP_H
|
||||
|
||||
Reference in New Issue
Block a user