Mercurial > hg > webaudioevaluationtool
comparison core.js @ 1042:afcb4ed5a26f
Feature #1283: Added <file> node to audio elements containing file information.
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Sat, 20 Jun 2015 11:16:30 +0100 |
parents | db70840ba8bb |
children | f6e8b7156017 |
comparison
equal
deleted
inserted
replaced
1041:6a188a912b0f | 1042:afcb4ed5a26f |
---|---|
890 | 890 |
891 this.exportXMLDOM = function() { | 891 this.exportXMLDOM = function() { |
892 var root = document.createElement('audioElement'); | 892 var root = document.createElement('audioElement'); |
893 root.id = this.specification.id; | 893 root.id = this.specification.id; |
894 root.setAttribute('url',this.url); | 894 root.setAttribute('url',this.url); |
895 var file = document.createElement('file'); | |
896 file.setAttribute('sampleRate',this.buffer.sampleRate); | |
897 file.setAttribute('channels',this.buffer.channels); | |
898 file.setAttribute('sampleCount',this.buffer.length); | |
899 file.setAttribute('duration',this.buffer.duration); | |
900 root.appendChild(file); | |
895 root.appendChild(this.interfaceDOM.exportXMLDOM(this)); | 901 root.appendChild(this.interfaceDOM.exportXMLDOM(this)); |
896 root.appendChild(this.commentDOM.exportXMLDOM(this)); | 902 root.appendChild(this.commentDOM.exportXMLDOM(this)); |
897 root.appendChild(this.metric.exportXMLDOM()); | 903 root.appendChild(this.metric.exportXMLDOM()); |
898 return root; | 904 return root; |
899 }; | 905 }; |