W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: decodeAudioBuffer, XHR and MIME headers

From: K. Gadd <kg@luminance.org>
Date: Wed, 24 Jul 2013 14:26:00 -0700
Message-ID: <CAPJwq3XYFCfV=FOEC6tj89oGErt801s2j4Sm=1y2NMrVnDrTnQ@mail.gmail.com>
To: Jens Nockert <jens@nockert.se>
Cc: "Mandyam, Giridhar" <mandyam@quicinc.com>, Joseph Berkovitz <joe@noteflight.com>, "public-audio@w3.org WG" <public-audio@w3.org>
I cannot comment on precisely why the mime-type is important; I've never
actually written an MP3 decoder. But I know that the lack of mime type
information has at least caused problems with Web Audio in Firefox thus far.


>From what I understand, the problem is that they must automatically figure
out what type an audio file is, and this is very difficult without having
the assistance of mime-type. This certainly meshes with my understanding of
things, given that canPlayType and <audio>/<video> sources all use mime
types as part of their infrastructure for deciding what to play and how to
play it. Given the amount of engineering effort that seems to be going on
related to that bug, I assumed there was some sort of challenge involved
here. Maybe it's actually a super easy problem to solve and I'm just
missing something.

On Wed, Jul 24, 2013 at 2:19 PM, Jens Nockert <jens@nockert.se> wrote:

> On 24 Jul 2013, at 23:07, "K. Gadd" <kg@luminance.org> wrote:
> > Not to sidetrack, but 'streaming' is the key here. I've seen multiple
> mentions on this list (in particular re: the race condition/memcpy
> discussions) of the importance of being able to process large amounts of
> audio, and in that scenario having to download an entire 50MB of audio into
> a buffer before passing it into decodeAudioBuffer to decode all at once
> into another buffer is suboptimal. I said 'streaming' because being able to
> download and decode an MP3 in chunks of say 128kb at a time has lots of
> benefits - reduced memory usage, reduced latency before playback can begin,
> etc.
> Streaming is the key here, but I cannot really understand why the
> MIME-type is important?
> Almost every file is going to have an incomplete and/or useless MIME-type
> that will require sniffing anyhow. For useful (read, not audio/basic, or
> audio/L24) formats, you will only get the container type (audio/mp4,
> audio/ogg, audio/mpeg, audio/vnd.wave), and that should be trivial to sniff
> from the binary anyhow?
> Hugs,
> Jens Nockert
Received on Wednesday, 24 July 2013 21:27:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:23 UTC