mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-26 03:24:36 +00:00
Fix up Jack deprecation.
This commit is contained in:
parent
52c8d96dca
commit
84b2b9c7a5
10
audio/jack.c
10
audio/jack.c
@ -103,7 +103,15 @@ static size_t find_buffersize(jack_t *jd, int latency)
|
||||
{
|
||||
int frames = latency * g_settings.audio.out_rate / 1000;
|
||||
|
||||
int jack_latency = jack_port_get_total_latency(jd->client, jd->ports[0]);
|
||||
jack_latency_range_t range;
|
||||
int jack_latency = 0;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
jack_port_get_latency_range(jd->ports[i], JackPlaybackLatency, &range);
|
||||
if (range.max > jack_latency)
|
||||
jack_latency = range.max;
|
||||
}
|
||||
|
||||
SSNES_LOG("JACK: Jack latency is %d frames.\n", jack_latency);
|
||||
|
||||
int buffer_frames = frames - jack_latency;
|
||||
|
Loading…
x
Reference in New Issue
Block a user