Skip to content

Float32 to Int16 in StereoAudioRecorderHelper.js #176

@crky14

Description

@crky14

Current implementation is multiplying Float32 number in range (-1,1) by 0xFFFF which is eqvivalent to 65535. I found that with this conversion data is incorrect.

By som googling I found that using this:

num < 0 ? num * 0x8000 : num * 0x7FFF;

Im getting results equivalent to numpy implementation.

Is this a issue or I got something wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions