+ if (f->has_audio ()) {
+ _matcher.reset (new Matcher (f->log(), f->audio_frame_rate(), f->video_frame_rate()));
+ _delay_line.reset (new DelayLine (f->log(), f->audio_channels(), f->audio_delay() * f->audio_frame_rate() / 1000));
+ _gain.reset (new Gain (f->log(), f->audio_gain()));
+ }
+
+ if (_matcher) {
+ _player->connect_video (_matcher);
+ _matcher->connect_video (_encoder);
+ } else {
+ _player->connect_video (_encoder);
+ }