Releases: pipelined/signal
Releases · pipelined/signal
Unified allocator interface and channel slicing
Pool allocator, pointer receivers and Frequency type
- New pool allocator API is the replacement for
pipelined.dev/pipe/pool
package. It allows to use sync.Pool to reduce GC pressure in the hottest parts; - Pointer receivers for signal interfaces. The original aim was to provide an API as-close-as-possible to standard slices. However, because this package is using interfaces, copy-on-modification didn't make sense;
- Frequency type replaces SampleRate as it's a more broad term and it's broadly used in synthesis and DSP domains.
Arbitrary signal types
New API to manipulate arbitrary signal types:
- signal.Slice;
- signal.AsFloating;
- signal.AsSigned;
- signal.AsUnsigned;
Moved BufferIndex to signal interface.
Append allocations
Append functions now rely on builtin slice grow algorithm to reduce number of allocations.
Buffer clean up
Now buffers are cleared up once returned to the pool.
Fix floating to fixed conversions
This patch fixes incorrect floating casting.
Avoid unnecessary slice header allocation on Pool.Put
This release removes unnecessary slice header allocation on every Pool.Put call. Buffer will be Sliced only if length of the buffer has changed.
Read, Write and Conversion functions are aligned with standard library
Read, Write and Conversion functions now return a number of samples read per channel. It allows to avoid to make a caller responsible for signal buffer slicing once function is called.
Also, Length is added to allocator - it allows to allocate buffers with defined length.
Signal types and pool merge
- Support for all signal types
- Conversions between all signal types
- Merge pool into signal
Fix badge refs
Badges refer to correct import path