Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream .on('data') always passes Uint8Array to callback #43

Open
jmarcosfer opened this issue Jul 21, 2022 · 0 comments
Open

Stream .on('data') always passes Uint8Array to callback #43

jmarcosfer opened this issue Jul 21, 2022 · 0 comments

Comments

@jmarcosfer
Copy link

Regardless of the specified encoding passed in the settings when creating the mic instance, the on 'data' listener always passes an Uint8Array to the callback.

I would expect this data to be, for example, of type Int16Array if I specify a 'signed-integer' encoding.

Looking at the source code, here the encoding argument of the transform stream's _transform method seems to be unused. I'm not sure if that's where the change would have to be made to get the right TypedArray according to the specified encoding.

If anyone here can point me in the right direction (right place in source code), I don't mind working out a potential solution and opening a PR.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant