fix(deps): update rust crate cpal to 0.18#56
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
ee6fc2a to
54fef10
Compare
0a9826c to
08c0ca1
Compare
d5eb70f to
c0a30af
Compare
5edb35b to
3f4eccf
Compare
3f4eccf to
104c8b9
Compare
ab850df to
ac471c5
Compare
ac471c5 to
335bbe9
Compare
9b25ff7 to
12478f9
Compare
09c30e1 to
403e41c
Compare
403e41c to
1c84e4d
Compare
6aade5a to
474433f
Compare
b8c783c to
8160cf9
Compare
8cb5d21 to
c1dbb87
Compare
c1dbb87 to
912a9f5
Compare
22c469c to
a40fe20
Compare
944996c to
134a90b
Compare
0aca9f8 to
4e60207
Compare
7c2ba28 to
3ab788f
Compare
3ab788f to
01e3cb8
Compare
01e3cb8 to
ed4532e
Compare
97c4e30 to
0f6c73e
Compare
0f6c73e to
87680fe
Compare
87680fe to
bada41e
Compare
dfff048 to
515c86b
Compare
636d2b4 to
27f23da
Compare
4ec8b6a to
fb49c64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.14→0.18Release Notes
RustAudio/cpal (cpal)
v0.18.1Compare Source
Fixed
pipewirefrom thedocs.rsbuild; system dependency not available in its environment.wasm-bindgencausing compile errors on non-browserwasm32targets such aswasm32-wasip1.v0.18.0Compare Source
Added
ErrorKindvariants for the unified error type:BackendError(platform error without aspecific mapping);
DeviceBusy(retryable device access, e.g. EBUSY/EAGAIN);DeviceChanged(audio route changed to another device);
InvalidInput(invalid caller-supplied values);PermissionDenied(OS-level access denial);RealtimeDenied(real-time scheduling refused —previously only printed to stderr);
ResourceExhausted(OS thread/memory limits);UnsupportedOperation(backend or device does not implement the operation).Devicenow implementsPartialEq,Eq,Hash,Display, andDebugon all backends.realtimefeature for real-time audio thread scheduling without a D-Bus build dependency.StreamTrait::now()to query the current instant on the stream's clock.StreamTrait::buffer_size()to query the stream's current buffer size in frames per callback.SAMPLE_RATE_CD(44100 Hz) andSAMPLE_RATE_48K(48000 Hz) constants.SupportedStreamConfigRange::try_with_standard_sample_rate()andwith_standard_sample_rate()to select 48 kHz or 44.1 kHz from a range.
SupportedStreamConfigRange::contains_rate()to test whether a sample rate falls within a range.StreamConfigandSupportedStreamConfignow implementCopy.BufferSizenow implementsDefault(returnsBufferSize::Default).SupportedBufferSizenow implementsDefault(returnsSupportedBufferSize::Unknown).HostTrait::device_by_id()is now backend-dispatched, allowing each host to override thedefault implementation.
PERFORMANCE_MODE_LOW_LATENCYwith therealtimefeature;reports
ErrorKind::RealtimeDeniedif not granted.device_by_id()now accepts PCM shorthand names such ashw:0,0andplughw:foo.F64sample format support.Changed
DevicesError,SupportedStreamConfigsError, etc.) andHostUnavailableinto a unifiedError/ErrorKind. See UPGRADING.md.DeviceTraitnow requiresPartialEq + Eq + Hash + Debug + Displaywith a stable device ID.DeviceTrait::build_*_stream()now takesStreamConfigby value instead of&StreamConfig.StreamInstantAPI changed and extended to mirrorstd::time::Instant/Duration. SeeUPGRADING.md for migration details.
build_*_stream(); callplay()explicitly.Previously ALSA, CoreAudio, and JACK auto-started streams on creation.
Previously the preferred rate was backend-dependent (typically 44.1 kHz or device maximum).
SupportedStreamConfigRange::cmp_default_heuristicsnow ranks allSampleFormatvariants;F32>F64> descending integer widths. Default configs may now returnI32orI24onhigh-precision hardware. See UPGRADING.md.
DeviceIdfields are now private; construct withDeviceId::new(host, id)and access with.host()/.id(). See UPGRADING.md.audio_thread_priorityfeature renamed torealtime-dbus.DeviceDescription::extended()now returnsimpl Iterator<Item = &str>instead of&[String].See UPGRADING.md.
HostId::name()now returns a more human-friendly name.DeviceDescriptionBuildersetters now acceptimpl AsRef<str>instead ofimpl Into<String>.SupportedBufferSizein enumeration is nowUnknown.Speaker (Builtin Speaker)).supported_input_configs()andsupported_output_configs()now return an error fordirection-mismatched devices instead of silently returning an empty list.
ErrorKind::DeviceNotAvailableon devicedisconnection.
LinkSynchronizedhardware cross-timestamps for lower jitteron supported devices.
realtimefeature now skips RT promotion for ineligible PCM types (null,I/O plugins, wrapper types).
ErrorKind::StreamInvalidatedonkAsioResyncRequestor a sample rate change of 1 Hz or more from the configured rate.kAsioLatenciesChanged.Device::driver,asio_streams, andcurrent_callback_flagare no longerpub.BufferSize::Fixednow setsrenderSizeHinton theAudioContext.range of 3-768 kHz.
ErrorKind::StreamInvalidatedon any samplerate change on macOS, and on iOS on route changes that require a stream rebuild.
ErrorKind::DeviceNotAvailableon iOSwhen media services are lost.
ErrorKind::DeviceChangedwhen the systemdefault output device changes, or on iOS when headphones are unplugged.
default_output_config()now prefers stereo over the maximum channel count.ErrorKind::DeviceNotAvailableon server shutdown.ErrorKind::RealtimeDeniedonce if the processcallback is not running at real-time scheduling priority.
Stream::connect_to_system_outputs()andconnect_to_system_inputs()now returnResult<(), Error>and roll back the port graph on failure.transparently.
device changes; stream error callback receives
ErrorKind::DeviceChanged.FriendlyNameis now preferred as device name overDeviceDesc.Device::immdevice()now returnsOption<Audio::IMMDevice>.windowsdependency lower bound to 0.61.range of 3-768 kHz.
Removed
StreamInstant::add()andsub()replaced bychecked_add()/+andchecked_sub()/-.DeviceTrait::name().Defaultimplementation forDevice.AlsaHostis no longer re-exported fromcpal::platform.U24incorrectly listed as a supported sample format.Fixed
channels: 0,sample_rate: 0, orBufferSize::Fixed(0)now returnErrorKind::InvalidInputconsistently across all backends (previously
UnsupportedConfigor a panic).ErrorKind::StreamInvalidatedinstead of panicking (AAudio,ASIO, CoreAudio, JACK, WASAPI).
build_*_streamreturns theStreamhandle (ALSA, ASIO, WASAPI).buffer_capacity_in_framesinteger overflow for large fixed buffer sizes (AAudio, ALSA).StreamInstant(ASIO, CoreAudio, JACK).and falling back to zero on error.
sample_ratevalues abovei32::MAXpanicking.error_callback.ErrorKind::BackendErrorinstead of panicking on sample count overflow inthe data callback.
supported_configs()reporting buffer size instead of period size, using the samebuffer range for all formats/channels, and dropping sample rates outside
COMMON_SAMPLE_RATES.BufferSize::Fixedvalidation opening the PCM device a second time.build_*_stream_rawreturningUnsupportedConfiginstead ofUnsupportedOperationfor direction-mismatched devices.
collect().kAsioBufferSizeChange.kAsioLatenciesChanged.driver.sample_rate()failures at stream creation silently ignored.kAsioOverload.BufferSize::Fixedwith a size not aligned to the driver's step constraint notreturning
ErrorKind::UnsupportedConfig.default_output_device()returning non-Nonewhen AudioWorklet isunavailable.
destination.maxChannelCount.supported_output_configs()reportingFrameCount::MAXas the buffersize upper bound (correct:
floor(6 * sample_rate)per spec).supported_output_configs()reporting 128 as the minimum render quantumwhen
renderQuantumSizeis supported (spec minimum is 1).unplugged; they now reroute or report
ErrorKind::DeviceNotAvailable.after crashes.
supported_output/input_configs()collapsing non-continuous hardware ratesinto a continuous range (regression since v0.17.0).
BufferSize::Fixedproducing cryptic backend errors when not validatedagainst the hardware buffer range.
BufferSize::Fixednot validated against the supported range beforestream creation.
activate_async()failure panicking instead of returning an error.supported_input/output_configs()reporting a hardcoded sparse channel listinstead of enumerating all counts up to physical system ports.
channels: 0orsample_rate: 0silently using PipeWire-negotiated valuesinstead of returning
ErrorKind::InvalidInput.supported_output_configs()anddefault_output_config()not accountingfor PulseAudio's double-buffer.
supported_input_configs()advertising unsupported sample rates on inputdevices.
sample_rate: 0withBufferSize::Fixedcausing a divide-by-zero panic.supported_input/output_configs()anddefault_input/output_config()reportingan unconstrained buffer range on software audio stacks.
I24not enumerated and 24-bit devices misidentified asI32.play()calls.default_output_device()returningSomewhen WebAudio is unavailable.destination.maxChannelCount.v0.17.3Compare Source
Changed
DeviceBusyerror variant addition.Fixed
v0.17.2Compare Source
Added
DeviceBusyerror variant for retriable device access errors (EBUSY, EAGAIN).Debugimplementations forHost,Device,Stream, and internal types.Changed
alsadependency to 0.11.core-audio-rsdependency to 0.14.Fixed
v0.17.1Compare Source
Added
Defaultimplementation forDevice(returns the ALSA "default" device).Changed
Fixed
v0.17.0Compare Source
Added
DeviceTrait::idmethod that returns a stable audio device ID.HostTrait::device_by_idto select a device by its stable ID.DisplayandFromStrimplementations forHostId.Hosts,Devices, andStreams.Sample::bits_per_samplemethod.Copyimplementation toInputCallbackInfoandOutputCallbackInfo.StreamError::StreamInvalidatedvariant for when stream must be rebuilt.StreamError::BufferUnderrunvariant for buffer underrun/overrun notifications.Hashimplementation toDevicefor all backends.SendandSyncimplementations toStream.I24andU24sample format support (24-bit samples stored in 4 bytes).EqandPartialEqimplementations toDevice.i8,i32andI24sample format support (24-bit samples stored in 4 bytes).Sendimplementation toStream.BufferSize::Fixedvalidation against supported range.BufferSize::Fixedvalidation to reject requests that don't match server buffer size.IMMDevicefrom WASAPI host Device.I24andU24sample format support (24-bit samples stored in 4 bytes).SendandSyncimplementations toStream.SendandSyncimplementations toStream.BufferSize::Fixedvalidation against supported range.Changed
SampleRatefrom struct tou32type alias.audio_thread_priorityto 0.34.BufferSize::Fixedprecision and audio callback performance.BufferSize::Defaultto use the device defaults.aplay -Ldoes.alsato 0.10.silent=truetoPCM.try_recover, so it doesn't write to stderr.StreamError::BufferUnderrun.sys::Asioinstance across allHostinstances.cargo updatesyntax for compatibility with Cargo 1.70 (use-pflag instead of positional argument).Device::supported_configsto return a single element containing the available sample rate range when all elements have the samemMinimumandmMaximumvalues.Cloneimplementation fromStream.StreamError::StreamInvalidatedfor JACK server sample rate changes.StreamError::BufferUnderrun.windowsto >= 0.59, <= 0.62.Fixed
kAsioResetRequestmessage to prevent driver UI becoming unresponsive.Removed
wee-allocfeature for security reasons.v0.16.0Compare Source
Added
supports_input/outputmethods toDeviceTrait.COMMON_SAMPLE_RATES.InputCallbackInfo,OutputCallbackInfoandStreamInstant.Defaultimpl forHost.PartialOrd,OrdandHashimplementations forSampleFormat.Clone,PartialEq,EqandHashimplementations for all error enums.Changed
oboetondk::audio. NOTE: This raises the minimum Android API version to 26 (Android 8/Oreo).coreaudio-rsdependency to 0.13.jackdependency to 0.13.Fixed
eval.v0.15.3Compare Source
Added
try_with_sample_rate, a non-panicking variant ofwith_sample_rate.#[must_use]attribute to structplatform::Stream.Copyimplementation to enumSupportedBufferSizeand structSupportedStreamConfigRange.Cloneimplementation toplatform::Device.Changed
jnidependency to 0.21.oboedependency to 0.6.ndkdependency to 0.8 and disabledefault-features.alsadependency to 0.9.asmjs-unknown-emscriptentarget.trunk, improve syth-thones example.windowsdependency to v0.54.wasm-bindgento 0.2.89.Fixed
atomicsflag is enabled.Removed
parking_lotdependency in favor of the std library.v0.15.2Compare Source
Added
Changed
windowsdependency.Fixed
v0.15.1Compare Source
Added
oboe-shared-stdcxxto enableshared-stdcxxonoboefor Android support.Changed
machdependency tomach2.Removed
thiserrordependency.v0.15.0Compare Source
Added
Changed
dasp_samplecrate for the sample trait.oboedependency.alsadependency.coreaudio-sysdependency.web-syson the emscripten target.jackdependency.windows-rsdependency.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.