claus / flac-metadata Goto Github PK
View Code? Open in Web Editor NEWFLAC metadata processor for Node.js, implemented as Transform stream
FLAC metadata processor for Node.js, implemented as Transform stream
The flac metadata parser failes handling concurrent executions.
sample code:
var fs = require("fs");
var flac = require("flac-metadata");
var readMeta = function readMeta(filename) {
var reader = fs.createReadStream(filename);
var processor = new flac.Processor({
parseMetaDataBlocks: true
});
processor.on("postprocess", function(mdb) {
console.log(filename, 'part', mdb.type, mdb.isLast);
});
processor.on('finish', function(){
console.log(filename, 'finished')
})
reader.pipe(processor);
}
readMeta('one.flac');
readMeta('two.flac');
Output with version 0.1.1:
one.flac part 0 false
one.flac part 4 false
one.flac part 6 false
one.flac part 1 true
one.flac finished
Output with @A---- fix:
one.flac part 0 false
one.flac part 4 false
one.flac part 6 false
one.flac part 1 true
two.flac part 0 false
two.flac part 4 false
two.flac part 6 false
two.flac part 1 true
one.flac finished
(two.flac is missing)
Found this issue while testing my code with mocha.
@A---- your pull request works better, but the finish event is still not fired
Hello @claus,
how can I write album cover arts to flac files?
Thank you very much!
Regarding the TODO
line 140:
https://github.com/claus/flac-metadata/blob/master/lib/Processor.js#L140
Maybe it'd be best since it's a stream to simply emit an error
message, alongside a description of the error?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.