Friday, April 29, 2016

How to convert arrayBuffer into an mp3 audio?

Leave a Comment

with using AudioContext of javascript the mixing of audio is achived and for exporting the audio mix i used OfflineAudioContext and,n, lame js to encode the decoded audio , now the expoort is working fine but it is very slow , i am looking for an efficient way to do that with more faster than the current one .

1 Answers

Answers 1

Check this [thread][1]

  document.querySelector('input').onchange = function(){        var fileReader  = new FileReader;        fileReader.onload = function(){           var arrayBuffer = this.result;           snippet.log(arrayBuffer);           snippet.log(arrayBuffer.byteLength);           }        fileReader.readAsArrayBuffer(this.files[0]);          var url = URL.createObjectURL(this.files[0]);         audio_player.src = url;         audio_player.play();      };
<!-- Provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 -->  <script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"></script>  <input id="audio_file" type="file" accept="audio/*" />  <audio id="audio_player" />

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment