You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Hi!
For now, node’s Buffers are interpreted by ndarrays as having simple
UInt8
type, where each value is integer within0..255
range, and is accessed asbuffer[index]
. There seems to be a lot of applications of buffers with other types, likefloat
, orint32
. For example, node-speaker takesint16LE
buffers, which is default for PCM-streams encoding, AFAIK, and other libs work withfloat
-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.
The text was updated successfully, but these errors were encountered: