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