0

I am creating a project for streaming microphone audio PCM data to play on another browser and I am currently done the streaming part and am looking to some sort of optimization as I am sending a buffer that is 8192 long.

I saw in some very few places where encoding the buffer data of the audio to Base64 can help optimization, and I was wondering why?

Lets say one of the floats in a buffer is -0.00009942707401933149. Is that less bytes than what it is in Base64? (LTAuMDAwMDk5NDI3MDc0MDE5MzMxNDk=) And if so, why?

Also, I was wondering whether I am supposed to post this question here on Stack Overflow or the Computer Science section.

Community
  • 1
  • 1
ZeroByter
  • 374
  • 2
  • 8
  • 22
  • I think most modern browsers can work with the raw binary data, so why bother encoding/decoding? – mscdex Apr 19 '16 at 16:33
  • Its not because of the browsers, its because of the bandwidth. – ZeroByter Apr 19 '16 at 16:43
  • If bandwidth is a concern, have you looked into using an efficient codec instead of transmitting raw/uncompressed audio data? I've used opus before. – mscdex Apr 19 '16 at 18:04
  • @mscdex I have looked into Opus, but there just hasn't been any specific documents on how to turn raw/uncompressed audio buffers into opus and if even the browser would be able to do it fast enough for streaming. And I am not the greatest coder so I don't know where to start by my self (which is why I am here). – ZeroByter Apr 19 '16 at 18:36

0 Answers0