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
Changed memory handling in C++ code (improves safety and could improve performance a bit).
Moved audio transformation code to C++ to improve performance.
Improved metadata types in functions and methods (TypeScript) so the right instance can be automatically casted with the right if condition.
StreamDecoder and FileDecoder now emits format which tells some information about the audio format inside the stream/file. This information can be read from another stream when piped (like in speaker package) to automatically configure itself.
StreamEncoder and FileEncoder now understands format event from source stream when piped. This information is used to configure the encoder automatically (if some of the values are provided already, they will be overridden by the event). Can be helpful when paired with a source stream like wav's Reader.
Properly handle exceptions when resolving promises of async methods. Previously, if an exception was thrown when resolving the promise in C++, the promise left unresolved indefinitely and the exception was lost. Now is handled properly and the promise rejects.
FileDecoder could retry a read if it failed, throwing two or more times the same error.
Avoid garbage noise under some circumstances when using StreamEncoder or FileEncoder.
Updated error handling in StreamDecoder, FileDecoder, StreamEncoder and FileEncoder so errors are not lost.
Possible breaking changes
All init functions now throws instead of returning status. The migration path is not to check the returned value in the init function and use a try/catch block if error handling is required.
Moved StreamDecoder and FileDecoder into a decoder module, and split implementations inside their own modules (decoder/stream-decoder and decoder/file-decoder).
Moved StreamEncoder and FileEncoder into a encoder module, and split implementations inside their own modules (encoder/stream-encoder and encoder/file-encoder).
StreamDecoder and FileDecoder now by default the outputAs32 will be always false (previously was set to true if the flac was 24 bit).
StreamEncoder and FileEncoder now by default the inputAs32 will be always false (previously was set to true if the input was 24 bit).