Skip to content

Passing integer-valued samples out of range should raise a descriptive error. #407

@psobot

Description

@psobot

In at least three cases (#406, #390, #369) users have reported passing int16-scaled data as float32 without scaling it down first, which results in some scale-invariant plugins working just fine (like Reverb, Delay, etc) and others failing completely (Compressor, Limiter, PitchShift).

We can detect this with a tiny performance penalty in the render call, and raise an exception if the input provided is:

  1. All integer values (no fractional parts)
  2. Looks like it was provided by taking 16-bit integer data and just converting to float32

This would prevent this class of issue from being raised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions