Skip to content

(de-)allocation in render thread #359

Open
@b-ma

Description

@b-ma

Follow up on #353, plus few ideas:

  • Implement Drop to drop AudioBuffer and Vec cleanly in renderers (cf. Otto's comment)
    • AudioBufferSourceRenderer::buffer
    • ConvolverRenderer::buffer
    • WaveshaperRenderer::curve
    • BiquadFilter::{x1, x2, y1, y2} -> consider using ArrayVec instead?
    • DelayRenderer::ring_buffer
    • DynamicsCompressorRenderer::ring_buffer
    • IirFilterRenderer::{norm_coefs, states} -> consider using ArrayVec instead, we can probably clamp eveything using MAX_CHANNELS and the max number of coefs (i.e. 20) ?
  • Use ArrayVec instead of Vec in AudioParam (this is already a dependency so that's cool, and except for resize this is mostly a drop in) Perf - use ArrayVec instead of Vec for internal AudioParam buffer #363
  • Implement optimizations proposed there, especially the second one as most of the time params are not modulating (or are not modulated by) an incoming signal (ok, this one is a bit out of context... :)
  • Install https://github.com/Windfisch/rust-assert-no-alloc to make sure our render thread is clean

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions