audio_core/cubeb_input: Set default value for latency_frames
On Android OpenSL, cubeb could not find the minimum latency. Therefore, this variable was left uninitialized and caused problems when opening the stream.
This commit is contained in:
parent
000884fe0d
commit
373ab0e69a
@ -82,7 +82,7 @@ void CubebInput::StartSampling(const Frontend::Mic::Parameters& params) {
|
||||
input_params.format = CUBEB_SAMPLE_S16LE;
|
||||
input_params.rate = params.sample_rate;
|
||||
|
||||
u32 latency_frames;
|
||||
u32 latency_frames = 512; // Firefox default
|
||||
if (cubeb_get_min_latency(impl->ctx, &input_params, &latency_frames) != CUBEB_OK) {
|
||||
LOG_ERROR(Audio, "Could not get minimum latency");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user