fasterthanlime / jsmad

:saxophone: Javascript MPEG-1 Audio Layer III (mp3) and ID3v2 decoder
http://audiocogs.org/codecs/mp3/
762 stars 41 forks source link

mp3 play - size and count too large #24

Closed abhinavlele closed 13 years ago

abhinavlele commented 13 years ago

Hey, I am trying to play a mp3 file from http://www.rakofficial.com/facebook/index.html or http://downloads.turiamedia.com/bands/riddareavkoden/files/Riddare%20av%20Koden%20-%20A%20Voice%20Will%20Call.zip . The mp3 that I am trying is Elegy. But I keep getting the following errors

size and count too large return string.replace( rdashAlpha, fcamelCase ); size and count too large return string.replace( rdashAlpha, fcamelCase ); .... Device reinit - buffer underflow. jquery-1.6.2.js (line 609) playtime = 4.753 / 39682.044726618704, preloaded = 1

I used the following js commands Mad.Player.fromURL('http://localhost/myapp/fs2/?type=readfile&name=RiddareavKoden-AVoiceWillCall-01-Elegy.mp3&path=/D1316449974862/audio',function(pl) { plx2 = pl; log('x2'); }) plx2.createDevice()

Is there something else that I need to do? Can you help me?

nddrylliog commented 13 years ago

What browser are you using?

abhinavlele commented 13 years ago

Firefox 6.0.2 on Ubuntu

nddrylliog commented 13 years ago

If you download that mp3 file, and open it on http://jsmad.org/, does it play?

I'm suspecting the ID3 tag isn't getting read correctly.

nddrylliog commented 13 years ago

Just tested your mp3 - on Chrome 12 on Windows, it plays fine (with the well-known samplerate bug). On Chrome 14 it plays perfectly (apparently the default samplerate has changed?), and on Firefox Aurora 8.0a on Windows it plays but with weird artifacts, and I had to try several times to get it working.

abhinavlele commented 13 years ago

I tried this on Chromium 12.0.742.112 (90304) Ubuntu 11.04 and I get this

plx2.createDevice()

this.playing 2 channels, samplerate = 44100 audio, mode 3 playtime = 0 / NaN, preloaded = 1 No audio sink available. playtime = 0.252 / Infinity, preloaded = 1 playtime = 0.504 / Infinity, preloaded = 1 playtime = 0.755 / Infinity, preloaded = 1 Device reinit - buffer underflow.

The code output says that there is no audio sink. How to get that fixed?

abhinavlele commented 13 years ago

and no audio

nddrylliog commented 13 years ago

Can you enable the Web Audio API in about:flags? (on Chrome under Ubuntu)

abhinavlele commented 13 years ago

I tried this in on Chrome 15.0.874.15 dev again, with Experimental APIs enabled. Now I don't get the error, however I can't hear anything even though in the logs it looks like it is playing. Any pointers on that?

nddrylliog commented 13 years ago

Are your speakers turned on / headphones plugged in? ;)

But seriously though, please try to play your mp3 at http://jsmad.org/ - click "Browse file" and try to play it, with Chrome 14.

abhinavlele commented 13 years ago

:) well ya the speakers are turned on ... but i guess something else needs to figured out on my side. thanks