diff options
Diffstat (limited to 'libavdevice/jack_audio.c')
-rw-r--r-- | libavdevice/jack_audio.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c index 280f24d..bd6a770 100644 --- a/libavdevice/jack_audio.c +++ b/libavdevice/jack_audio.c @@ -3,20 +3,20 @@ * Copyright (c) 2009 Samalyse * Author: Olivier Guilyardi <olivier samalyse com> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -32,6 +32,7 @@ #include "libavformat/avformat.h" #include "libavformat/internal.h" #include "timefilter.h" +#include "avdevice.h" /** * Size of the internal FIFO buffers as a number of audio packets @@ -151,7 +152,6 @@ static int start_jack(AVFormatContext *context) JackData *self = context->priv_data; jack_status_t status; int i, test; - double o, period; /* Register as a JACK client, using the context filename as client name. */ self->client = jack_client_open(context->filename, JackNullOption, &status); @@ -187,9 +187,7 @@ static int start_jack(AVFormatContext *context) jack_set_xrun_callback(self->client, xrun_callback, self); /* Create time filter */ - period = (double) self->buffer_size / self->sample_rate; - o = 2 * M_PI * 1.5 * period; /// bandwidth: 1.5Hz - self->timefilter = ff_timefilter_new (1.0 / self->sample_rate, sqrt(2 * o), o * o); + self->timefilter = ff_timefilter_new (1.0 / self->sample_rate, self->buffer_size, 1.5); /* Create FIFO buffers */ self->filled_pkts = av_fifo_alloc(FIFO_PACKETS_NUM * sizeof(AVPacket)); |