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;
|
||||
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)
|
||||
{
|
||||
Log_ErrorPrintf("Could not get minimum latency: %d", rv);
|
||||
|
@ -71,6 +78,7 @@ bool CubebAudioStream::OpenDevice()
|
|||
{
|
||||
latency_frames = m_buffer_size;
|
||||
}
|
||||
}
|
||||
|
||||
char stream_name[32];
|
||||
std::snprintf(stream_name, sizeof(stream_name), "AudioStream_%p", this);
|
||||
|
|
Loading…
Reference in New Issue