25 lines
638 B
JavaScript
25 lines
638 B
JavaScript
"use strict";
|
|
|
|
var File = require("./file");
|
|
var Vocabulary = require("../../wType/vocabulary");
|
|
var Vector = require("../../wType/vector");
|
|
var Uint64 = require("../../wType/uint64");
|
|
|
|
var Audio = File.inherit({
|
|
className: "Audio",
|
|
constructor: function Audio(addr) {
|
|
File.fn.constructor.call(this, addr);
|
|
},
|
|
hasMore: function() {
|
|
return this.getSize() > this.data.length();
|
|
},
|
|
getBitrate: function() {
|
|
return this._additional.at("bitrate").valueOf();
|
|
},
|
|
getDuration: function() {
|
|
return this._additional.at("duration").valueOf() / 1000;
|
|
}
|
|
});
|
|
|
|
module.exports = Audio;
|