Re: Different results in decodeAudioData?

Peter,

I think the overall method is fine, but you would probably be better off with a truly lossless audio format instead of MP3. This would give you absolutely predictable decoder output. MP3, however standardized, allows enough variability in the codec implementations that one can get data with subtle variations like what you're encountering. It is not required nor expected that the output of MP3 decoding will exactly match what went into the encoder.

…Joe

On Feb 12, 2013, at 3:48 PM, Peter van der Noord <peterdunord@gmail.com> wrote:

> So basically, this method i'm using is quite unreliable and useless, since every browser (or even a version) can have its own varying method of decoding?
> 
> 2013/2/12 Raymond Toy <rtoy@google.com>
> 
> 
> 
> On Tue, Feb 12, 2013 at 1:35 PM, Peter van der Noord <peterdunord@gmail.com> wrote:
> > Were you running the same version of chrome at home and at work? 
> 
> I guess not, that would make the difference even weirder. i'll check the versions tomorrow. i did try on both locations on both a regular version and canary (how can i update the latter by the way?)
> 
> 
> I don't remember exactly when it happened, but the decoders changed in chrome so that under some conditions, the leading part of the decoded mp3 and aac files are removed.  (These are artifacts of how the encoding process is done.)
> 
> I normally just wait for canaries to update themselves, but I think you can go to  https://www.google.com/intl/en/chrome/browser/canary.html.
> 
> Ray
> 
> 
> 
> 2013/2/12 Raymond Toy <rtoy@google.com>
> 
> 
> 
> On Tue, Feb 12, 2013 at 6:40 AM, Peter van der Noord <peterdunord@gmail.com> wrote:
> I'm creating a little music-engine where a collection of mp3's can be grouped and seamlessly looped. Due to the nature of mp3s, this requires to set the actual looping points of all mp3 in the decoded data beforehand, so we know exactly which bytes to play.
> 
> I set the looppoints for some testfiles at home, but when i checked the project at work, i noticed that they were all placed incorrectly, so it seems that different browsers can decode mp3files differently (this was all in chrome btw). Is this just
> 
> Were you running the same version of chrome at home and at work? 
> how it is, and will my method therefor not work crossbrowser (without me having to set those looppoints for each brower+version)?
> 
> 
> I don't have a definitive answer for this, but some time ago, I created a little test that plots some audio files.  If you look at the top of the plot, it lists how many samples were decoded for each file.  (The original source is exactly 1 sec of audio at 44.1kHz.)  I know this number varies between chrome and safari and may also vary between different versions of chrome.
> 
> Ray
> 
> 
> 
> 

... .  .    .       Joe

Joe Berkovitz
President

Noteflight LLC
Boston, Mass.
phone: +1 978 314 6271
www.noteflight.com
"Your music, everywhere"

Received on Thursday, 14 February 2013 14:01:19 UTC