All notable changes to this project will be documented in this file.
Migration guides for incompatible versions can be found in UPGRADE.md file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
ChirpandEmptynow implementIterator::size_hintandExactSizeIterator.SamplesBuffernow implementsExactSizeIterator.Zeronow implementstry_seek,total_durationandCopy.- Added
Source::is_exhausted()helper method to check if a source has no more samples. - Added
Rednoise generator that is more practical thanBrowniannoise. - Added
std_dev()toWhiteUniformandWhiteTriangular. - Added a macro
nz!which facilitates creating NonZero's forSampleRateandChannelCount. - Adds a new input source: Microphone.
- Adds a new method on source: record which collects all samples into a SamplesBuffer.
- Adds
wav_to_writerwhich writes aSourceto a writer. - Added supported for
I24output (24-bit samples on 4 bytes storage). - Added audio dithering support with
ditherfeature (enabled by default):- Four dithering algorithms:
TPDF,RPDF,GPDF, andHighPass DitherAlgorithmenum for algorithm selectionSource::dither()function for applying dithering
- Four dithering algorithms:
- Added
64bitfeature to opt-in to 64-bit sample precision (f64).
- docs.rs will now document all features, including those that are optional.
Chirp::nextnow returnsNonewhen the total duration has been reached, and will work correctly for a number of samples greater than 2^24.PeriodicAccessis slightly more accurate for 44.1 kHz sample rate families.- Fixed audio distortion when queueing sources with different sample rates/channel counts or transitioning from empty queue.
- Fixed
SamplesBufferto correctly report exhaustion and remaining samples. - Improved precision in
SkipDurationto avoid off-by-a-few-samples errors. - Fixed channel misalignment in queue with non-power-of-2 channel counts (e.g., 6 channels) by ensuring frame-aligned span lengths.
- Fixed channel misalignment when sources end before their promised span length by padding with silence to complete frames.
- Fixed
Emptysource to properly report exhaustion. - Fixed
Zero::current_span_lenreturning remaining samples instead of span length.
output_to_wavrenamed towav_to_fileand now takes ownership of theSource.Bluenoise generator uses uniform instead of Gaussian noise for better performance.Gaussiannoise generator has standard deviation of 0.6 for perceptual equivalence.Velvetnoise generator takes density in Hz asusizeinstead off32.- Upgraded
cpalto v0.17. - Clarified
Source::current_span_len()contract documentation. - Improved queue, mixer and sample rate conversion performance.
- Upgrade
cpalto v0.16. - Update dependencies.
- Fix clippy warnings with
Source::whiteandSource::pinkfunctions.
- 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.
- 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.
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
Sample::zero_value()function in favor ofSample::ZERO_VALUEconstant. - Deprecated
white()andpink()methods in favor ofnoise::WhiteUniform::new()andnoise::Pink::new().
- Breaking: Removed
Mp4Typeenum in favor of using MIME type string "audio/mp4" for MP4 format detection withDecoder::new_mp4(#612).
- Builds without the
symphoniafeature did not compile
- 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.
Sink.try_seeknow updatescontrols.positionbefore returning. Calls toSink.get_posdone immediately after a seek will now return the correct value.
SamplesBufferis nowClone
- Adds a new source
track_position. It keeps track of duration since the beginning of the underlying source.
- Mp4a with decodable tracks after undecodable tracks now play. This matches VLC's behaviour.
- Seek no longer hangs if the sink is empty.
Sourcetrait is now also implemented forBox<dyn Source>and&mut Sourcefn new_vorbisis now also available when thesymphonia-vorbisfeature is enabled
- 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
- 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
- Build fix for
minimp3backend.
- Add
EmptyCallbacksource. - Fix index out of bounds bug.
- Use non-vulnerable
minimp3fork. - Add filter functions with additional q parameter.
- Disable
symphonia's default features.
- Update
cpalto 0.15. - Default to
symphoniafor mp3 decoding.
- 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.
- 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.
- Fix panic when no
pulseaudio-alsawas installed.
- Update
cpalto 0.13. - Add Android support.
- 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.
- 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.
- Remove exclusive
&mutborrow requirements inSink&SpatialSinksetters. - Use
nalgebrainstead ofcgmathforSpatialsource.
- Update
lewtondependency to 0.9 - Change license from
Apache-2.0only toApache-2.0 OR MIT
- Add mp3 decoding capabilities via
minimp3
- 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