-
Notifications
You must be signed in to change notification settings - Fork 111
Add output format options to the mpg123 decoder #86
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
base: master
Are you sure you want to change the base?
Conversation
| var channels = opts.channels || (MPG123_MONO | MPG123_STEREO); | ||
| var signed = opts.signed ? MPG123_ENC_SIGNED : 0; | ||
| var float = opts.float ? MPG123_ENC_FLOAT : 0 | ||
| var bitDepth = MPG123_ENC_8 | MPG123_ENC_16 | MPG123_ENC_24 | MPG123_ENC_32; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line correct? 🤔 why are we oring them together?
LinusU
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thing I'm wondering about...
|
Looks great! |
|
Doesn't that make Decoder a Transcoder? |
Relevant issue: #52
Previous PR: #83
First call
mpg123_format_noneto clear the output format table, then callmpg123_formatto set the output format based on the option parameter of the Decoder constructor.Encoding table: https://github.com/TooTallNate/node-lame/blob/master/deps/mpg123/src/libmpg123/mpg123.h.in#L348-L388
mpg123_format_none: https://www.mpg123.de/api/group__mpg123__output.shtml#ga931ca238347de394901c3baa13e7a8f8mpg123_format: https://www.mpg123.de/api/group__mpg123__output.shtml#gadad5794afc300a997e517dbe397dc2c7Inspired by: https://sourceforge.net/p/mpg123/mailman/message/25123550/