Skip to content

Int data is not converted to float properly #8

@wrgrant

Description

@wrgrant

At this line you appear to be specifying that the dtype be converted to float32 before being sent into the low level library.

The problem is, since this is the audio domain, there is an expectation that float values are in the range -1.0 to 1.0.

Converting the data type from into to float just adds a decimal place, it doesn't do the division by (2^bitWidth) / 2 to properly scale to floating point.

May I suggest converting the data based on the sample bit width in your code?

I think this is a safe assumption, considering libsamplerate is targeted at audio processing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions