Skip to content

0.7.0

Latest

Choose a tag to compare

@steckes steckes released this 26 Feb 15:03
· 3 commits to main since this release
856b1ef

Breaking Changes

  • Type names no longer prefixed with AudioBlock — all concrete types have been renamed for brevity:

    Before After
    AudioBlockInterleaved Interleaved
    AudioBlockInterleavedView InterleavedView
    AudioBlockInterleavedViewMut InterleavedViewMut
    AudioBlockPlanar Planar
    AudioBlockPlanarView PlanarView
    AudioBlockPlanarViewMut PlanarViewMut
    AudioBlockSequential Sequential
    AudioBlockSequentialView SequentialView
    AudioBlockSequentialViewMut SequentialViewMut
    AudioBlockMono Mono
    AudioBlockMonoView MonoView
    AudioBlockMonoViewMut MonoViewMut
  • copy_from_block now returns Option<(u16, usize)> — returns None if the entire block was copied (exact size match), or Some((channels_copied, frames_copied)) if a partial copy occurred.

  • copy_from_block no longer calls set_visible — previously, copy_from_block resized the destination block to min(src, dst) channels and frames via set_visible. This call has been removed; the destination block's visible size is now left unchanged.

  • copy_mono_to_all_channels now returns Option<usize> — previously returned (). Now returns None if all frames were copied (exact match), or Some(frames_copied) if a partial copy occurred. A new copy_mono_to_all_channels_exact (panicking) variant has been added.

  • for_each_including_non_visible / enumerate_including_non_visible renamed — these methods are now called for_each_allocated and enumerate_allocated respectively, with improved documentation clarifying when to prefer them over for_each / enumerate.

New Features

  • mix_to_mono now returns Option<usize> — a new mix_to_mono_exact (panicking) variant has been added.
  • copy_channel_to_mono / copy_channel_to_mono_exact — new ops to copy a single channel into a mono buffer.
  • gain method — new gain(S) method on AudioBlockOpsMut applies a gain factor to all samples in the block.
  • Default and Clone for all owned types — Interleaved, Planar, Sequential, and Mono now implement Default and Clone.

Other Changes

  • Updated criterion dev-dependency to 0.8.2
  • Expanded benchmark suite with block-types bench
  • README and docs autogenerated and improved