Releases: mmig/libflac.js
Version 5.4.0
-
added tests in
tools/test
-
added utility classes for encoding and decoding (TypeScript in
src/**
, JavaScript inlib/**
) -
added support for metadata (other than default STREAMINFO):
- if enabled, metadata (other than STREAMINFO) is returned in the 2nd argument of
metadata_callback_fn
callback - changed signature for
metadata_callback_fn
:- old signature:
metadata_callback_fn(data: StreamMetadata)
- new signature:
metadata_callback_fn(data: StreamMetadata | undefined, rawData: MetadataBlock | undefined)
- old signature:
- decoding: enable/disable (raw) metadata output (in metadata callback)
- FLAC__stream_decoder_set_metadata_respond(..)
- FLAC__stream_decoder_set_metadata_respond_application(..)
- FLAC__stream_decoder_set_metadata_respond_all(..)
- FLAC__stream_decoder_set_metadata_ignore(..)
- FLAC__stream_decoder_set_metadata_ignore_application(..)
- FLAC__stream_decoder_set_metadata_ignore_all(..)
- for debugging: enable raw metadata via
Flac.setOptions(id, {enableRawMetadata: true})
- encoding: EXPERIMENTAL add metadata blocks (as binary data)
- FLAC__stream_encoder_set_metadata(..)
- if enabled, metadata (other than STREAMINFO) is returned in the 2nd argument of
-
added example code for
Flac.FLAC__stream_encoder_process(enc, TypedArray[], numberOfSamples)
-
fixed
onready
forundefined
:- typings: allow (re-)setting
Flac.onready
toundefined
- BUGFIX: do not try to invoke
onready
hook, if set toundefined
- typings: allow (re-)setting
-
BUGFIX example/utils/data-utils::addFLACMetaData(): do use
offset
when writingtotal_samples
to FLAC header -
recompiled with
emscripten
v1.39.19 (llvm toolchain)
Version 5.3.0
-
FIX incorrect API documentation: error-callback for decoder is not optional
init_decoder_stream(decoder, read_callback_fn, write_callback_fn, error_callback_fn, ...)
-
exposed additional library functions:
FLAC__stream_decoder_get_md5_checking(decoder, boolean)
FLAC__stream_encoder_get_verify_decoder_state(encoder)
FLAC__stream_encoder_get_verify(encoder)
-
added support for non-interleaved encoding method:
FLAC__stream_encoder_process(encoder, channelBuffers, numberOfSamples)
-
added
variant
property when using library factory method, i.e. when running innode
:
do add propertyvariant
to returned instance for indicating which library variant is returned -
disabled generated code for
node
that would catch uncaught exceptions and promises:
these should be handled by application code instead of the library -
improved typings
Version 5.2.1
- examples: added example code for reading/encoding 8-bit and 24-bit WAV data
Version 5.2.0
- added emitting of life cycle events when encoder or decoder instances are created and destroyed
- e.g.
Flac.on('created', function(evt){ console.log('created '+evt.target.type+' with id '+evt.target.id) });
- e.g.
- added experimental support for getting metadata for subframes (in decoding write callback); needs to be explicitly enabled (see
Flac.setOptions()
) - added functions
Flac.setOptions(p_coder, options)
andFlac.getOptions(p_coder)
:
set additional encoding/decoding options- supported options:
analyseSubframes
: for decoding: include subframes metadata in write-callback metadata, DEFAULT:false
analyseResiduals
: for decoding: include residual data in subframes metadata in write-callback metadata (analyseSubframes
must also be enabled), DEFAULT:false
- supported options:
- FIX decoding for standard bit depth values 8 and 24
- recompiled with
emscripten
v1.39.18 (llvm toolchain) - improved generation for typings/documentation
since Version 5.2.0-beta.1:
- extended interface for encoding write callback
encoder_write_callback_fn(..)
:
if returnsfalse
, encoding will be aborted (any other or no value returned will continue encoding) - compile based on
libFLAC
v1.3.3 - recompiled with
emscripten
v1.39.11 (llvm toolchain) - BUGFIX for decoding: handle padded 24-bit samples correctly
Version 5.1.1
- provide specific typings for function type definitions
Version 5.1.0
- [BREAKING CHANGE] removed support for exporting library to global namespace when loaded as module, that is, in case it is loaded as AMD or CommonJS module
- if the library should sill be available when loaded as module, this needs to be done this manually now,
e.g. if require'd as flacModule (in browser):or (in node):window.Flac = flacModule;
global.Flac = flacModule;
- consequently, support for enviornment flag
was dropped, e.g. usingFLAC_UMD_MODE
process.env.FLAC_UMD_MODE = true;
orprocess.env.FLAC_UMD_MODE = false;
will have no effect any more
- if the library should sill be available when loaded as module, this needs to be done this manually now,
- improved compatibility with
webpack
:
simplified UMD wrapper so thatwebpack
may detect AMD loading correctly - added typings for
TypeScript
- improved API documentation
- recompiled with
emscripten
v1.39.3 (llvm toolchain)
Version 5.0.0
first version published on npm
Version 5.0.0
- added support for OGG streams
- upgraded to emscripten 1.39.3 for compiling
- use new emscripten default toolchain LLVM/upstream
IMPORTANT: Changed File Names & Directory Structure
Starting with version 5.0.0, this library is available as NPM managed package.
Before this, the library targeted non-managed browser projects, meaning that
for the main usage it was expected that the library was included as (manually copied)
resources in web projects. For this reason, it included version information in the
compiled library's name.
Now version information is included in the NPM package itself, and version information
in the compiled library's name is not useful anymore.
In addition, inclusion/usage by other projects is managed via NPM, thus rendering
sub-directories for the different library variants obsolete.
For this reason, starting with this version, the library variants' file names
do not include version information anymore, and are organized in a flat directory
structure.
dist/libflac4-1.3.2xxx -> dist/libflac.xxx
dist/min/libflac4-1.3.2.min.xxx -> dist/libflac.min.xxx
dist/dev/libflac4-1.3.2.dev.xxx -> dist/libflac.dev.xxx
libflac.js v0.3.0
libflac.js v0.3.0
-
based on Flac version 1.3.2
-
support for multi-channel encoding
-
support for decoding Flac
-
dev
andmin
variants for libflac.js -
asynchronous initialization for
min
variants, cfg.
Flac.isReady()
Flac.onready
-
changed API: renamed functions
(in order to reflect original C API)init_libflac
->init_libflac_encoder
decode_buffer_flac_as_pcm
->FLAC__stream_decoder_process_single
decode_stream_flac_as_pcm
->FLAC__stream_decoder_process_until_end_of_stream
decode_metadata_flac
->FLAC__stream_decoder_process_until_end_of_metadata
encode_buffer_pcm_as_flac
->FLAC__stream_encoder_process_interleaved
stream_decoder_get_state
->FLAC__stream_decoder_get_state
-
changed API: removed unusable function
FLAC__stream_encoder_init_file
-
changed API: changed singature
- init_libflac_decoder: removed unnecessary parameters (& added optional parameter)
function(sample_rate, channels, bps, compression_level, total_samples)
->
function(is_verify)
- init_libflac_encoder: extended signature with additional, optional parameter is_verify
function(sample_rate, channels, bps, compression_level, total_samples)
->
function(sample_rate, channels, bps, compression_level, total_samples, is_verify)
- init_libflac_decoder: removed unnecessary parameters (& added optional parameter)