# HG changeset patch # User Nicholas Jillings # Date 1434795390 -3600 # Node ID afcb4ed5a26fe459ae63376af7ab156d2cf99a03 # Parent 6a188a912b0f5fb20b741ff63b33a736da3537d2 Feature #1283: Added node to audio elements containing file information. diff -r 6a188a912b0f -r afcb4ed5a26f core.js --- a/core.js Sat Jun 20 11:04:44 2015 +0100 +++ b/core.js Sat Jun 20 11:16:30 2015 +0100 @@ -892,6 +892,12 @@ var root = document.createElement('audioElement'); root.id = this.specification.id; root.setAttribute('url',this.url); + var file = document.createElement('file'); + file.setAttribute('sampleRate',this.buffer.sampleRate); + file.setAttribute('channels',this.buffer.channels); + file.setAttribute('sampleCount',this.buffer.length); + file.setAttribute('duration',this.buffer.duration); + root.appendChild(file); root.appendChild(this.interfaceDOM.exportXMLDOM(this)); root.appendChild(this.commentDOM.exportXMLDOM(this)); root.appendChild(this.metric.exportXMLDOM());