1
0
Fork 0
Commit graph

44 commits

Author SHA1 Message Date
Robbert van der Helm 02622e6e4f Split up the buffer module 2022-03-10 18:15:55 +01:00
Robbert van der Helm 3c5aff1ec6 Rename Buffer::iter_mut() to iter_samples()
Since there's also an iter_blocks(). This is consistent with the new
Block method.
2022-03-09 20:11:37 +01:00
Robbert van der Helm fcd0522a33 Mark the remaining buffer iterators as inline 2022-03-09 19:45:42 +01:00
Robbert van der Helm 5041f959b7 Add a per-sample per-channel iterator for blocks 2022-03-09 19:27:21 +01:00
Robbert van der Helm dfb2407698 Rename the Channels struct to ChannelSamples
To make it slightly more obvious what it's iterating over.
2022-03-09 19:19:32 +01:00
Robbert van der Helm 2811ab2996 Mark more of the buffer functions as inline 2022-03-09 15:02:38 +01:00
Robbert van der Helm b06e67bde7 Supper non-buffer and non-sidechain inputs in STFT 2022-03-06 22:26:37 +01:00
Robbert van der Helm 4ff2e65b5c Add a note regarding the Buffer lifetime 2022-03-06 02:10:33 +01:00
Robbert van der Helm b2600f4b93 Add a helper for buffering audio for STFTs 2022-03-06 02:07:44 +01:00
Robbert van der Helm e5bac1e220 Add a channel count function to Buffer 2022-03-06 01:21:00 +01:00
Robbert van der Helm 54881dfa15 Add a len() function to Buffer 2022-03-06 01:12:28 +01:00
Robbert van der Helm e491ff6319 Fix clippy lints 2022-03-04 15:07:34 +01:00
Robbert van der Helm 3e0316e17c Add missing docstrings 2022-03-03 23:34:06 +01:00
Robbert van der Helm 80457ac0f9 Fix doc links after prelude migration 2022-03-03 23:30:29 +01:00
Robbert van der Helm f581294d7b Update rustdoc formatting for links
Apparently it showed this text verbatim, and not in monospace.
2022-03-03 23:05:12 +01:00
Robbert van der Helm a28e553fd2 Rename Block SIMD functions for more clarity
Because you could also do per-sample SIMD. For blocks that's simple
enough to do without any help though.
2022-03-01 21:59:12 +01:00
Robbert van der Helm 8c837573a0 Also add SIMD channel helpers for Block 2022-03-01 21:48:03 +01:00
Robbert van der Helm 33905e5bc2 Add optional SIMD helpers for channel buffers 2022-03-01 21:39:53 +01:00
Robbert van der Helm 09534a2657 Add a TODO regarding inlining iterators 2022-03-01 19:02:49 +01:00
Robbert van der Helm 5a005553bc Fix block length semantics 2022-03-01 17:55:38 +01:00
Robbert van der Helm c3f4e7e2d9 Yield offsets in the block iterator 2022-03-01 17:46:34 +01:00
Robbert van der Helm f389e0341e Also run buffer miri tests without miri 2022-03-01 17:43:04 +01:00
Robbert van der Helm e6292a4650 Add a usage example to Buffer::iter_blocks() 2022-03-01 16:16:13 +01:00
Robbert van der Helm b177e3114c Add per-block iterators to Buffer 2022-03-01 16:03:13 +01:00
Robbert van der Helm a58c796fc0 Add an output slices field to Buffer 2022-03-01 15:43:13 +01:00
Robbert van der Helm afb9449df5 Reorder buffer module
To have the same definitions -> trait impls -> other impls structure as
most other modules.
2022-03-01 04:21:26 +01:00
Robbert van der Helm d2517d6785 Rename Buffer::as_raw to Buffer::as_slice
Since things named `as_raw` usually involve pointers.
2022-03-01 04:18:06 +01:00
Robbert van der Helm 16c0dc8b1e Shorten miri tests
These extra iterations shouldn't matter, and miri is pretty slow.
2022-02-13 15:54:19 +01:00
Robbert van der Helm 2525319207 Add a miri test for the buffer 2022-02-13 02:29:10 +01:00
Robbert van der Helm a734dd09f3 Fix lifetimes on buffer adapter 2022-02-13 01:58:22 +01:00
Robbert van der Helm 73fe012751 Rename the buffer lifetimes 2022-02-13 01:48:56 +01:00
Robbert van der Helm 16e299ca34 Add the outer lifetime back to the sample buffer 2022-02-13 01:47:26 +01:00
Robbert van der Helm 81ddb410f5 Fix buffer iterators over last refactor
This len() function returns the remaining length, which is not what we
want.
2022-02-13 01:16:52 +01:00
Robbert van der Helm 8411313270 Move Buffer::iter_mut() lifetime definitions 2022-02-13 01:11:23 +01:00
Robbert van der Helm eac3fdf612 Fix duplicate mutable borrow soundness in buffer
This gets rid of multiple simultaneous &mut references to the
vector (which should be fine, I think), and also replaces the
`.iter_mut()` that just resets the index (which definitely leads to
soundness issues) with an `.iter_mut()` and a `.into_iter()` that don't
let you have concurrent mutable borrows to the same sample data.
2022-02-13 00:59:25 +01:00
Robbert van der Helm eea05cc748 Rename reset_iter to iter_mut
So it's more consistent.
2022-02-12 23:28:15 +01:00
Robbert van der Helm 2c394aabd5 Add nicer adapter for repeating channel iteration 2022-02-12 23:16:07 +01:00
Robbert van der Helm 0bb3113197 Fix manual buffer accessors 2022-02-12 20:33:31 +01:00
Robbert van der Helm 693b618bc5 Add accessors for channel data
This is needed when you want to modify the same sample multiple times
within an outer loop.
2022-02-12 19:24:41 +01:00
Robbert van der Helm f645b6a92f Relicense under the ISC license 2022-02-12 16:04:46 +01:00
Robbert van der Helm 33ad2d0b15 Fix typo in buffer iterator 2022-02-06 12:59:29 +01:00
Robbert van der Helm c4b983baf8 Implement ExactSizeIterator for the buffer adapter 2022-02-06 12:45:13 +01:00
Robbert van der Helm a42649b2de Derive a Default instance for the Buffer
To make Clippy happy.
2022-02-02 20:37:06 +01:00
Robbert van der Helm f44597df7c Move the buffer adapter to its own module 2022-02-02 15:01:41 +01:00