Skip to content

Commit

Permalink
Merge pull request #45 from novacrazy/master
Browse files Browse the repository at this point in the history
Update to numeric-array 0.6.1
  • Loading branch information
SamiPerttu authored Jul 5, 2024
2 parents 8b7fd21 + f3bd32d commit c883148
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ readme = "README.md"
edition = "2021"

[dependencies]
generic-array = "0.14.7"
numeric-array = { version = "0.5.2", default-features = false }
numeric-array = { version = "0.6.1", default-features = false }
dyn-clone = "1.0.17"
libm = "0.2.8"
wide = { version = "0.7.25", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions src/audionode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use numeric_array::typenum::*;
use numeric_array::{ArrayLength, NumericArray};

/// Type-level integer. These are notated as `U0`, `U1`...
pub trait Size<T>: ArrayLength<T> + ArrayLength<[F32x; SIMD_LEN]> + Sync + Send + Clone {}
pub trait Size<T>: ArrayLength + Sync + Send + Clone {}

impl<T, A: ArrayLength<T> + ArrayLength<[F32x; SIMD_LEN]> + Sync + Send + Clone> Size<T> for A {}
impl<T, A: ArrayLength + Sync + Send + Clone> Size<T> for A {}

/// Frames are arrays with a static size used to transport audio data
/// between `AudioNode` instances.
Expand Down
4 changes: 2 additions & 2 deletions src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@ impl BufferVec {
/// The number of channels must be known at compile time:
/// the size `N` is given as a type-level integer (`U0`, `U1`, ...).
#[derive(Clone, Default)]
pub struct BufferArray<N: ArrayLength<[F32x; SIMD_LEN]>> {
pub struct BufferArray<N: ArrayLength> {
array: Frame<[F32x; SIMD_LEN], N>,
}

impl<N: ArrayLength<[F32x; SIMD_LEN]>> BufferArray<N> {
impl<N: ArrayLength> BufferArray<N> {
/// Create new buffer.
#[inline]
pub fn new() -> Self {
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,10 @@ pub mod system;
pub mod wave;
pub mod wavetable;

// For Frame::generate.
pub use generic_array::sequence::GenericSequence;
// GenericSequence is for Frame::generate.
pub use numeric_array::{self, generic_array::sequence::GenericSequence, typenum};

pub use funutd;
pub use numeric_array;
pub use numeric_array::typenum;
pub use thingbuf;
pub use wide;

Expand Down

0 comments on commit c883148

Please sign in to comment.