mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
CubebAudioStream: Continue even without minimum latency
Fixes audio not functioning on Android.
This commit is contained in:
parent
982c428074
commit
c7b457de9e
|
@ -47,6 +47,13 @@ bool CubebAudioStream::OpenDevice()
|
||||||
|
|
||||||
u32 latency_frames = 0;
|
u32 latency_frames = 0;
|
||||||
rv = cubeb_get_min_latency(m_cubeb_context, ¶ms, &latency_frames);
|
rv = cubeb_get_min_latency(m_cubeb_context, ¶ms, &latency_frames);
|
||||||
|
if (rv == CUBEB_ERROR_NOT_SUPPORTED)
|
||||||
|
{
|
||||||
|
Log_WarningPrintf("Cubeb backend does not support latency queries, using buffer size of %u.", m_buffer_size);
|
||||||
|
latency_frames = m_buffer_size;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (rv != CUBEB_OK)
|
if (rv != CUBEB_OK)
|
||||||
{
|
{
|
||||||
Log_ErrorPrintf("Could not get minimum latency: %d", rv);
|
Log_ErrorPrintf("Could not get minimum latency: %d", rv);
|
||||||
|
@ -71,6 +78,7 @@ bool CubebAudioStream::OpenDevice()
|
||||||
{
|
{
|
||||||
latency_frames = m_buffer_size;
|
latency_frames = m_buffer_size;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
char stream_name[32];
|
char stream_name[32];
|
||||||
std::snprintf(stream_name, sizeof(stream_name), "AudioStream_%p", this);
|
std::snprintf(stream_name, sizeof(stream_name), "AudioStream_%p", this);
|
||||||
|
|
Loading…
Reference in a new issue