forked from suyu/suyu
audio: allow more latency in cubeb initialization
This commit is contained in:
parent
ada4697300
commit
954144e22b
2 changed files with 3 additions and 8 deletions
|
@ -364,7 +364,7 @@ bool IsCubebSuitable() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Test min latency
|
// Get min latency
|
||||||
cubeb_stream_params params{};
|
cubeb_stream_params params{};
|
||||||
params.rate = TargetSampleRate;
|
params.rate = TargetSampleRate;
|
||||||
params.channels = 2;
|
params.channels = 2;
|
||||||
|
@ -380,11 +380,6 @@ bool IsCubebSuitable() {
|
||||||
}
|
}
|
||||||
latency = std::max(latency, TargetSampleCount * 2);
|
latency = std::max(latency, TargetSampleCount * 2);
|
||||||
|
|
||||||
if (latency > TargetSampleCount * 3) {
|
|
||||||
LOG_ERROR(Audio_Sink, "Cubeb latency is too high, it is not suitable.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test opening a device with standard parameters
|
// Test opening a device with standard parameters
|
||||||
cubeb_devid output_device{0};
|
cubeb_devid output_device{0};
|
||||||
cubeb_devid input_device{0};
|
cubeb_devid input_device{0};
|
||||||
|
|
|
@ -83,8 +83,8 @@ const SinkDetails& GetOutputSinkDetails(Settings::AudioEngine sink_id) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_ERROR(Service_Audio, "Auto-selecting the {} backend",
|
LOG_INFO(Service_Audio, "Auto-selecting the {} backend",
|
||||||
Settings::CanonicalizeEnum(iter->id));
|
Settings::CanonicalizeEnum(iter->id));
|
||||||
} else {
|
} else {
|
||||||
if (iter != std::end(sink_details) && !iter->is_suitable()) {
|
if (iter != std::end(sink_details) && !iter->is_suitable()) {
|
||||||
LOG_ERROR(Service_Audio, "Selected backend {} is not suitable, falling back to null",
|
LOG_ERROR(Service_Audio, "Selected backend {} is not suitable, falling back to null",
|
||||||
|
|
Loading…
Reference in a new issue