mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 05:15:47 -04:00
dep/cubeb: Sync to 19fcbef
And apply PR #740 (Re-enable and polish IAudioClient3 to achieve lower latencies). `*latency_frames = min_period;` in wasapi_get_min_latency was changed to `*latency_frames = hns_to_frames(params.rate, min_period_rt);`, as otherwise it reports in mixer frames, not stream frames.
This commit is contained in:
@ -67,7 +67,7 @@ validate_stream_params(cubeb_stream_params * input_stream_params,
|
||||
XASSERT(input_stream_params || output_stream_params);
|
||||
if (output_stream_params) {
|
||||
if (output_stream_params->rate < 1000 ||
|
||||
output_stream_params->rate > 192000 ||
|
||||
output_stream_params->rate > 768000 ||
|
||||
output_stream_params->channels < 1 ||
|
||||
output_stream_params->channels > UINT8_MAX) {
|
||||
return CUBEB_ERROR_INVALID_FORMAT;
|
||||
@ -75,7 +75,7 @@ validate_stream_params(cubeb_stream_params * input_stream_params,
|
||||
}
|
||||
if (input_stream_params) {
|
||||
if (input_stream_params->rate < 1000 ||
|
||||
input_stream_params->rate > 192000 ||
|
||||
input_stream_params->rate > 768000 ||
|
||||
input_stream_params->channels < 1 ||
|
||||
input_stream_params->channels > UINT8_MAX) {
|
||||
return CUBEB_ERROR_INVALID_FORMAT;
|
||||
@ -239,9 +239,6 @@ cubeb_get_backend_names()
|
||||
#if defined(USE_SNDIO)
|
||||
"sndio",
|
||||
#endif
|
||||
#if defined(USE_SUN)
|
||||
"sun",
|
||||
#endif
|
||||
#if defined(USE_OSS)
|
||||
"oss",
|
||||
#endif
|
||||
@ -304,6 +301,21 @@ cubeb_get_preferred_sample_rate(cubeb * context, uint32_t * rate)
|
||||
return context->ops->get_preferred_sample_rate(context, rate);
|
||||
}
|
||||
|
||||
int
|
||||
cubeb_get_supported_input_processing_params(
|
||||
cubeb * context, cubeb_input_processing_params * params)
|
||||
{
|
||||
if (!context || !params) {
|
||||
return CUBEB_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!context->ops->get_supported_input_processing_params) {
|
||||
return CUBEB_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
return context->ops->get_supported_input_processing_params(context, params);
|
||||
}
|
||||
|
||||
void
|
||||
cubeb_destroy(cubeb * context)
|
||||
{
|
||||
@ -463,6 +475,36 @@ cubeb_stream_get_current_device(cubeb_stream * stream,
|
||||
return stream->context->ops->stream_get_current_device(stream, device);
|
||||
}
|
||||
|
||||
int
|
||||
cubeb_stream_set_input_mute(cubeb_stream * stream, int mute)
|
||||
{
|
||||
if (!stream) {
|
||||
return CUBEB_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!stream->context->ops->stream_set_input_mute) {
|
||||
return CUBEB_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
return stream->context->ops->stream_set_input_mute(stream, mute);
|
||||
}
|
||||
|
||||
int
|
||||
cubeb_stream_set_input_processing_params(cubeb_stream * stream,
|
||||
cubeb_input_processing_params params)
|
||||
{
|
||||
if (!stream) {
|
||||
return CUBEB_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!stream->context->ops->stream_set_input_processing_params) {
|
||||
return CUBEB_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
return stream->context->ops->stream_set_input_processing_params(stream,
|
||||
params);
|
||||
}
|
||||
|
||||
int
|
||||
cubeb_stream_device_destroy(cubeb_stream * stream, cubeb_device * device)
|
||||
{
|
||||
|
Reference in New Issue
Block a user