2018-12-17 17:15:58 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var File = require("./file");
|
|
|
|
var Vocabulary = require("../../wType/vocabulary");
|
2018-12-21 21:21:12 +00:00
|
|
|
var Vector = require("../../wType/vector");
|
2018-12-17 17:15:58 +00:00
|
|
|
var Uint64 = require("../../wType/uint64");
|
|
|
|
|
|
|
|
var Audio = File.inherit({
|
|
|
|
className: "Audio",
|
|
|
|
constructor: function Audio(addr) {
|
|
|
|
File.fn.constructor.call(this, addr);
|
2018-12-21 21:21:12 +00:00
|
|
|
},
|
2018-12-17 17:15:58 +00:00
|
|
|
hasMore: function() {
|
2019-01-24 19:54:16 +00:00
|
|
|
return this.getSize() > this.data.length();
|
2018-12-17 17:15:58 +00:00
|
|
|
},
|
2019-01-24 19:54:16 +00:00
|
|
|
getBitrate: function() {
|
|
|
|
return this._additional.at("bitrate").valueOf();
|
2018-12-17 17:15:58 +00:00
|
|
|
},
|
2019-01-24 19:54:16 +00:00
|
|
|
getDuration: function() {
|
|
|
|
return this._additional.at("duration").valueOf();
|
2018-12-17 17:15:58 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = Audio;
|