nikhilm / node-taglib

Simple taglib bindings to Javascript using node.js
http://nikhilm.github.com/node-taglib
MIT License
147 stars 25 forks source link

Read TagLib AudioProperties #3

Closed masterkain closed 13 years ago

masterkain commented 13 years ago

Hello, is there any plan to also read and export the AudioProperties from the file?

if(!f.isNull() && f.audioProperties()) {

  TagLib::AudioProperties *properties = f.audioProperties();

  int seconds = properties->length() % 60;

  cout << "-- AUDIO --" << endl;
  cout << "bitrate     - " << properties->bitrate() << endl;
  cout << "sample rate - " << properties->sampleRate() << endl;
  cout << "channels    - " << properties->channels() << endl;
  cout << "length      - " << seconds << endl;
}
nikhilm commented 13 years ago

could you elaborate on what sort of API you are looking for? or some use case perhaps? Thanks.

masterkain commented 13 years ago

We are rebuilding our platform that relies on having the duration in seconds of an audio track. Thanks.