@@ -22,6 +22,7 @@ QMutex audio_write_lock;
|
||||
qint8 audio_ibuffer[audio_ibuffer_size];
|
||||
int audio_ibuffer_read = 0;
|
||||
long audio_ibuffer_frame = 0;
|
||||
double audio_ibuffer_timecode = 0;
|
||||
|
||||
AudioSenderThread* audio_thread;
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ extern QMutex audio_write_lock;
|
||||
extern qint8 audio_ibuffer[audio_ibuffer_size];
|
||||
extern int audio_ibuffer_read;
|
||||
extern long audio_ibuffer_frame;
|
||||
extern double audio_ibuffer_timecode;
|
||||
void clear_audio_ibuffer();
|
||||
|
||||
void init_audio();
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ void cache_audio_worker(Clip* c, Clip* nest) {
|
||||
// apply any audio effects to the data
|
||||
if (nb_bytes == INT_MAX) nb_bytes = av_samples_get_buffer_size(NULL, frame->channels, frame->nb_samples, static_cast<AVSampleFormat>(frame->format), 1);
|
||||
if (new_frame) {
|
||||
apply_audio_effects(c, (frame->pts * av_q2d(c->stream->time_base)), frame, nb_bytes);
|
||||
apply_audio_effects(c, bytes_to_seconds(c->audio_buffer_write, 2, sequence->audio_frequency) + audio_ibuffer_timecode, frame, nb_bytes);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user