mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
jack: update to new latency range API as the old one has been deprecated
Fixes Bugzilla #279. Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
parent
0533868642
commit
8772997d10
4
configure
vendored
4
configure
vendored
@ -1087,6 +1087,7 @@ HAVE_LIST="
|
|||||||
inet_aton
|
inet_aton
|
||||||
inline_asm
|
inline_asm
|
||||||
isatty
|
isatty
|
||||||
|
jack_port_get_latency_range
|
||||||
ldbrx
|
ldbrx
|
||||||
libdc1394_1
|
libdc1394_1
|
||||||
libdc1394_2
|
libdc1394_2
|
||||||
@ -2982,7 +2983,8 @@ check_header soundcard.h
|
|||||||
|
|
||||||
enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
|
enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
|
||||||
|
|
||||||
enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack
|
enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack &&
|
||||||
|
check_func jack_port_get_latency_range -ljack
|
||||||
|
|
||||||
enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
|
enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
|
||||||
|
|
||||||
|
@ -91,7 +91,13 @@ static int process_callback(jack_nframes_t nframes, void *arg)
|
|||||||
|
|
||||||
/* Copy and interleave audio data from the JACK buffer into the packet */
|
/* Copy and interleave audio data from the JACK buffer into the packet */
|
||||||
for (i = 0; i < self->nports; i++) {
|
for (i = 0; i < self->nports; i++) {
|
||||||
|
#if HAVE_JACK_PORT_GET_LATENCY_RANGE
|
||||||
|
jack_latency_range_t range;
|
||||||
|
jack_port_get_latency_range(self->ports[i], JackCaptureLatency, &range);
|
||||||
|
latency += range.max;
|
||||||
|
#else
|
||||||
latency += jack_port_get_total_latency(self->client, self->ports[i]);
|
latency += jack_port_get_total_latency(self->client, self->ports[i]);
|
||||||
|
#endif
|
||||||
buffer = jack_port_get_buffer(self->ports[i], self->buffer_size);
|
buffer = jack_port_get_buffer(self->ports[i], self->buffer_size);
|
||||||
for (j = 0; j < self->buffer_size; j++)
|
for (j = 0; j < self->buffer_size; j++)
|
||||||
pkt_data[j * self->nports + i] = buffer[j];
|
pkt_data[j * self->nports + i] = buffer[j];
|
||||||
|
Loading…
Reference in New Issue
Block a user