Skip to content

Buffer problems #27

Open
Open
@dy

Description

@dy

Hi!
For now, node’s Buffers are interpreted by ndarrays as having simple UInt8 type, where each value is integer within 0..255 range, and is accessed as buffer[index]. There seems to be a lot of applications of buffers with other types, like float, or int32. For example, node-speaker takes int16LE buffers, which is default for PCM-streams encoding, AFAIK, and other libs work with float-typed buffers.
It would be super-awesome ndarrays take all the routine work of handling buffer types, as far there are lots of them.
Or what is the most appropriate solution for that? Current status quo is a bit frustrating.
As a workaround now, it is possible to create "generic" wrapper for buffers, but is seems like duplicating of ndarray’s work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions