rodio
Audio playback and recording library
0.22.2
10M downloads/mo
#3064 most downloaded on crates.io
RustAudio/rodio
What this package is like to depend on
Last release 5 months ago
05 Mar 2026
Ships fairly regularly
a new release about every 7 months
Some releases are documented
notes for 25 of 49 stable releases
2 versions withdrawn
withdrawn after publishing
11 years old
51 releases · first in 2015
3 releases in the last 12 months
see the full history below
Release timeline
51 releases · Sep 2015 to Mar 2026Releases
latest 51-
0.22.205 Mar 2026Release notes
Open source →Fixed
- Incorrectly set system default audio buffer size breaks playback. We no longer use the system default (introduced in 0.22 through cpal upgrade) and instead set a safe buffer duration.
- Audio output fallback picked null device leading to no output.
- Mixer did not actually add sources sometimes.
Added
- Added Opus support via
symphonia-adapter-libopus. - Third-party Symphonia codecs can be registered with
DecoderBuilder::with_symphonia_decoder.
-
0.22.122 Feb 2026 -
0.22.020 Feb 2026 -
0.21.114 Jul 2025Release notes
Open source →Changed
- Upgrade
cpalto v0.16. - Update dependencies.
Fixed
- Fix clippy warnings with
Source::whiteandSource::pinkfunctions.
- Upgrade
-
0.21.012 Jul 2025Release notes
Open source →Added
- Added
Source::amplify_decibel()method to control volume by decibels. - Added
Source::amplify_normalized()method to perceptually modify volume. - Adds a function to write a
Sourceto awavfile, enable thewav_outputfeature and seeoutput_to_wav. - Output audio stream buffer size can now be adjusted.
- Sources for directly generating square waves, triangle waves, square waves, and sawtooths have been added.
- An interface for defining
SignalGeneratorpatterns with anfn, seeGeneratorFunction. - Minimal builds without
cpalaudio output are now supported. SeeREADME.mdfor instructions. (#349) - Added
Sample::is_zero()method for checking zero samples. - Added
DecoderBuilderfor improved configuration. - Added
Pausable::is_paused()method for checking if source is paused. - Using
Decoder::TryFromforFilenow automatically wraps inBufReaderand setsbyte_len.TryFrom<Cursor<T>>andTryFrom<BufReader>are also supported. - Added
Source::distortion()method to control distortion effect bygainandthreshold. - Added
OutputStream::config()method to access anOutputStream'sOutputStreamConfigonce anOutputStreamhas been built. - Added
OutputStreamConfig::channel_count(),OutputStreamConfig::sample_rate(),OutputStreamConfig::buffer_size()andOutputStreamConfig::sample_format()getters to access anOutputStreamConfig's channel count, sample rate, buffer size and sample format values. - Added
Source::limit()method for limiting the maximum amplitude of a source. - Added more noise generators:
WhiteGaussian,WhiteTriangular,Blue,Brownian,Violet, andVelvet.
Changed
- Breaking:
OutputStreamBuildershould now be used to initialize an audio output stream. - Breaking:
OutputStreamHandleremoved, useOutputStreamandOutputStream::mixer()instead. - Breaking:
DynamicMixerControllerrenamed toMixer,DynamicMixerrenamed toMixerSource. - Breaking:
Sink::try_newrenamed toconnect_newand does not return error anymore.Sink::new_idlewas renamed tonew. - Breaking:
symphonia::SeekErrorhas a new variantAccurateSeekNotSupportedand variantsRetryingandRefininghave been removed. Catching this error may allow a caller to retry in coarse seek mode. - Breaking:
symphonia::SeekErrorhas a new variantRandomAccessNotSupported. This error usually means that you are trying to seek backward withoutis_seekableorbyte_lenset: useDecoder::try_fromorDecoderBuilderfor that. - Breaking: In the
Sourcetrait, the methodcurrent_frame_len()was renamed tocurrent_span_len(). - Breaking:
Decodernow outputsf32samples. - Breaking: The term 'frame' was renamed to 'span' in the crate and documentation.
- Breaking:
LoopedDecodernow returnsNoneif seeking fails during loop reset. - Breaking:
ReadSeekSource::new()now takesSettings. - Breaking: Sources now use
f32samples. To convert to and from other types of samples use functions fromdasp_samplecrate. For exampleDaspSample::from_sample(sample). - Breaking:
WhiteNoiseandPinkNoisehave been renamed tonoise::WhiteUniformandnoise::Pink. - Breaking: As optional features are now available: CAF and MKV containers, MP1/MP2 and ADPCM decoders. Previously, the ADPCM decoder was enabled when
symphonia-wavwas. - docs.rs will now document all features, including those that are not enabled by default.
OutputStreamConfigis now public.OutputStreamnow prints when it is dropped, can be disabled withOutputStream::log_on_drop(false).- Update
cpalto 0.16. - The default decoders have changed to Symphonia. The previous decoders are still available as optional features: use
claxonfor FLAC,lewtonfor Vorbis, andhoundfor WAV. - Support for decoding MP4 containers with AAC audio is now enabled by default.
Fixed
ChannelVolumeno longer clips/overflows when converting from many channels to fewer.- Symphonia decoder
total_durationincorrect value caused by conversion fromTimetoDuration. - An issue with
SignalGeneratorthat caused it to create increasingly distorted waveforms over long run times has been corrected. (#201) - WAV and FLAC decoder duration calculation now calculated once and handles very large files correctly.
- Removed unwrap() calls in MP3, WAV, FLAC and Vorbis format detection for better error handling.
LoopedDecoder::size_hintnow correctly indicates an infinite stream.- Symphonia decoder
total_durationno longer returnsNonewhen it could returnSome - Symphonia decoder for MP4 now seeks correctly (#577).
- White noise was not correctly uniformly distributed.
- Pink noise was not correctly distributed on sampling rates other than 44100 Hz.
Deprecated
- Deprecated
Sample::zero_value()function in favor ofSample::ZERO_VALUEconstant. - Deprecated
white()andpink()methods in favor ofnoise::WhiteUniform::new()andnoise::Pink::new().
Removed
- Breaking: Removed
Mp4Typeenum in favor of using MIME type string "audio/mp4" for MP4 format detection withDecoder::new_mp4(#612).
- Added
-
0.20.108 Nov 2024 -
0.20.007 Nov 2024 withdrawnRelease notes
Open source →Added
- Support for ALAC/AIFF
- Add
automatic_gain_controlsource for dynamic audio level adjustment. - New test signal generator sources:
SignalGeneratorsource generates a sine, triangle, square wave or sawtooth of a given frequency and sample rate.Chirpsource generates a sine wave with a linearly-increasing frequency over a given frequency range and duration.whiteandpinkgenerate white or pink noise, respectively. These sources depend on therandcrate and are guarded with the "noise" feature.- Documentation for the "noise" feature has been added to
lib.rs.
- New Fade and Crossfade sources:
fade_outfades an input out using a linear gain fade.linear_gain_rampapplies a linear gain change to a sound over a given duration.fade_outis implemented as alinear_gain_rampandfade_inhas been refactored to use thelinear_gain_rampimplementation.
Fixed
player.try_seeknow updatescontrols.positionbefore returning. Calls toplayer.get_posdone immediately after a seek will now return the correct value.
Changed
SamplesBufferis nowClone
-
0.19.029 Jun 2024Release notes
Open source →Added
- Adds a new source
track_position. It keeps track of duration since the beginning of the underlying source.
Fixed
- Mp4a with decodable tracks after undecodable tracks now play. This matches VLC's behaviour.
- Adds a new source
-
0.18.123 May 2024 -
0.18.005 May 2024Release notes
Open source →Changed
Sourcetrait is now also implemented forBox<dyn Source>and&mut Sourcefn new_vorbisis now also available when thesymphonia-vorbisfeature is enabled
Added
- Adds a new method
try_seekto all sources. It returns either an error or seeks to the given position. A few sources are "unsupported" they return the errorUnsupported. - Adds
SpatialSink::clear()bringing it in line withSink
Fixed
- channel upscaling now follows the 'WAVEFORMATEXTENSIBLE' format and no longer repeats the last source channel on all extra output channels. Stereo content playing on a 5.1 speaker set will now only use the front left and front right speaker instead of repeating the right sample on all speakers except the front left one.
mp3::is_mp3()no longer changes the position in the stream when the stream is mp3
-
0.17.323 Oct 2023 -
0.17.217 Oct 2023Release notes
Open source →- Add
EmptyCallbacksource. - Fix index out of bounds bug.
- Use non-vulnerable
minimp3fork. - Add filter functions with additional q parameter.
- Add
-
0.17.125 Feb 2023 -
0.17.017 Feb 2023 -
0.16.014 Sep 2022 -
0.15.025 Jan 2022Release notes
Open source →- Remove requirement that the argument
Decoder::newandLoopedDecoder::newimplementSend. - Add optional symphonia backend.
WavDecoder'stotal_durationnow returns the total duration of the sound rather than the remaining duration.- Add 32-bit signed in WAV decoding.
SineWave::new()now takes af32instead of au32.- Add
len()method toSpatialSink.
- Remove requirement that the argument
-
0.14.021 May 2021Release notes
Open source →- Re-export
cpalin full. - Replace panics when calling
OutputStream::try_default,OutputStream::try_from_devicewith newStreamErrorvariants. OutputStream::try_defaultwill now fallback to non-default output devices if anOutputStreamcannot be created from the default device.
- Re-export
-
0.13.129 Mar 2021 -
0.13.003 Nov 2020 -
0.12.005 Oct 2020Release notes
Open source →- Breaking: Update
cpalto 0.12. - Breaking: Rework API removing global "rodio audio processing" thread & adapting to the upstream cpal API changes.
- Add new_X format specific methods to Decoder.
- Fix resampler dependency on internal
Vec::capacitybehaviour.
- Breaking: Update
-
0.11.016 Mar 2020 -
0.10.016 Nov 2019Release notes
Open source →- Removal of nalgebra in favour of own code.
- Fix a bug that switched channels when resuming after having paused.
- Attempt all supported output formats if the default format fails in
Sink::new. - Breaking: Update
cpalto 0.10.
-
0.9.008 Jun 2019Release notes
Open source →- Remove exclusive
&mutborrow requirements inSink&SpatialSinksetters. - Use
nalgebrainstead ofcgmathforSpatialsource.
- Remove exclusive
-
0.8.118 Sep 2018Release notes
Open source →- Update
lewtondependency to 0.9 - Change license from
Apache-2.0only toApache-2.0 OR MIT
- Update
-
0.8.022 Jun 2018 -
0.7.021 Apr 2018Release notes
Open source →- Update
cpaldependency to 0.8, and adopt the new naming convention - BREAKING CHANGES:
- renamed
EndpointtoDevice - split
default_endpoint()intodefault_output_device()anddefault_input_device() - renamed
endpoints()todevices() - introduced
output_devices()andinput_devices()
- renamed
- Update
-
0.6.008 Feb 2018Nothing published for this version
-
0.5.308 Feb 2018 withdrawnNothing published for this version
-
0.5.222 Aug 2017Nothing published for this version
-
0.5.111 Jul 2017Nothing published for this version
-
0.5.004 May 2017Nothing published for this version
-
0.4.315 Apr 2017Nothing published for this version
-
0.4.214 Nov 2016Nothing published for this version
-
0.4.101 Oct 2016Nothing published for this version
-
0.4.006 Sep 2016Nothing published for this version
-
0.3.304 Sep 2016Nothing published for this version
-
0.3.217 Jun 2016Nothing published for this version
-
0.3.123 Oct 2015Nothing published for this version
-
0.3.022 Oct 2015Nothing published for this version
-
0.2.222 Oct 2015Nothing published for this version
-
0.2.117 Oct 2015Nothing published for this version
-
0.2.016 Oct 2015Nothing published for this version
-
0.1.827 Sep 2015Nothing published for this version
-
0.1.727 Sep 2015Nothing published for this version
-
0.1.624 Sep 2015Nothing published for this version
-
0.1.524 Sep 2015Nothing published for this version
-
0.1.423 Sep 2015Nothing published for this version
-
0.1.323 Sep 2015Nothing published for this version
-
0.1.222 Sep 2015Nothing published for this version
-
0.1.122 Sep 2015Nothing published for this version
-
0.1.011 Sep 2015Nothing published for this version