WebAudio not working

9 views
Skip to first unread message

jaen...@gmail.com

unread,
Apr 9, 2013, 2:18:51 PM4/9/13
to node-...@googlegroups.com
I was trying to implement a simple tool to be able to loop sound files in custom manner and make playlists out of them, but in the process it turned out that AudioContext.decodeAudioData callback is never called. Is the WebAudio API not supported and if so is it supposed to be in in 0.5.0 release? Or is it a bug?

jaen...@gmail.com

unread,
Apr 10, 2013, 5:06:07 AM4/10/13
to node-...@googlegroups.com, jaen...@gmail.com
I tried it on the 0.5.0-rc release and it's still not working.
For example this page here -http://katspaugh.github.io/wavesurfer.js/ - does not work, while in chromium it works flawlessly.
Is there something obvious I'm missing to enable WebAudio or should I file a bug on github?

Chris Turnbull

unread,
Apr 10, 2013, 2:58:54 PM4/10/13
to node-...@googlegroups.com, jaen...@gmail.com
I'm just checking - what audio format are you using?

If you're trying to use .mp3s, I don't think they're supported. However .ogg files will work - and you'd probably want to use .ogg files over .mp3 files anyway as they're a better format anyway. (And by "better", I mean better quality and/or compression ratio.)

Try pointing your copy of node-webkit at http://www.schillmania.com/projects/soundmanager2/ if you want to test different formats out.

Michael Morrison

unread,
Apr 10, 2013, 3:02:19 PM4/10/13
to node-...@googlegroups.com, jaen...@gmail.com
I tried it out with a couple other webaudio examples and had similar results. No console errors, but no audio. Looks like a bug to me.

-- Michael

Chris Turnbull

unread,
Apr 10, 2013, 4:37:56 PM4/10/13
to node-...@googlegroups.com
I'm guessing .mp3 isn't supported because of the license/patent issues surrounding it. For example, if you were to sell something that uses node-webkit, someone who believes they have the rights the .mp3 format might threaten to sue you for a cut of your sales - even if node-webkit itself was given to you for free. To make matters worse, patent law and who supposedly has the patent differs from country to country.

It's probably a lot easier on everyone involved for node-webkit to just support a format that's open source.

If you have to convert I'd highly recommend converting from the originals (I'm assuming you'd have the originals in .wav or .flac somewhere if you've got the rights to ship or bundle them).


On 10 April 2013 20:57, <jaen...@gmail.com> wrote:
Yeah, I was using .mp3s.
Most music I have is in that format so switching to .ogg is a no-no, even if the format is ostensibly better, since a) lossy-to-lossy translation will probably negate any of that advantage b) I'm not really keen on converting a lot of music just to have it working and probably most people that could benefit from what I'm writing wouldn't care for that either.

So I played around with sound manager examples and indeed .oggs and .wavs work without hitch. Why is .mp3 not supported then? Did no-one to date tried to use it or are there some license issues preventing node-webkit from implementing that?

Since I was already writing the app in Rails and using node-webkit mostly for unhindered filesystem access I decided to funnel them all through an AJAX based shim that does the job server-side and do away with node-webkit for the time being - it's slow as hell, but works good enough for me to keep coding. I'll gladly come around if .mp3 support in the future. Not sure if I can be of help here, since gyp doesn't seem to like me - I tried to compile from source before 0.5.0 was released to see if the issue was fixed, but I couldn't talk the build tool into behaving...

jaen...@gmail.com

unread,
Apr 18, 2013, 3:30:55 AM4/18/13
to node-...@googlegroups.com
That's what I figured, but then why many open source projects support .mp3s anyway?
Maybe there is a way to figure how .mp3 playback can be enabled not endangering users that are afraid of patent issues? Maybe a switch in the package manifest, plus a need to provide an appropriate .mp3 implementation .so/.dll would be enough? That way non-mp3 apps would not be in danger of suing and those who can afford to use .mp3s wouldn't be hindered by that?

The problem is I don't want to ship or bundle any sounds, it wouldn't be that much of a problem to find the original disk and rip the to .oggs, or even transcode from .mp3s, I doubt anyone would notice, but I want to be able to play files that user already has on his PC and telling him 'hey, you can use my app if and only if you convert all your music library from .mp3s to .ogss, they are all better off as .oggs anyway' is a big no-no. A lot of people download music of the intarwebs and even if they didn't I imagine they couldn't be bothered to convert them all just to use that one app that scoffs at .mp3.
Granted, my application looks unique enough to not have any alternatives - at least I didn't find any DM playlists with nice cataloguing and looping features - but they would probably don't care about the added benefit of not having to cut files manually in Audacity or playing them in the whole which sometimes can sound anticlimactic when you get an intro part in the middle of a fight or skipping if they have to make additional effort to use it.

It's either I can find some way to play .mp3s on node-webkit (help implement that in the way I described above? transcode .mp3s to .oggs using node?) or move off it entirely and continue to simulate node.js APIs through a REST interface.
I'm not sure about the coding part thought, in the end I didn't win against gyp, so I may turn out not to be of much help due to that ; /

Also, sorry for sending the last reply directly to you. I can't really wrap my head around those discussion groups.

Marc Torruella

unread,
Apr 18, 2013, 3:36:12 AM4/18/13
to node-...@googlegroups.com
did you tried to copy the ffmpeg dll from chrome directory to nodewebkit directory? it fixes de mp4 issue, maybe mp3 uses same dll


--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex Casanova

unread,
Jul 5, 2013, 11:19:10 PM7/5/13
to node-...@googlegroups.com
Is there a specific ffmpeg.dll  to use? The wiki mentions Chrome 25 but I'm having trouble tracking that down. I used 27.0.1453.116 and completely crashes after start up with nw 6.1.

ch...@digitalized.co.uk

unread,
Jul 8, 2013, 12:34:15 PM7/8/13
to node-...@googlegroups.com
I am having the same issue with the chrome ffmpeg.dll - tries v25, 27, 28 and 29 (dev) - all crash. I really don't want to convert the videos to WebM - any ideas anyone?
Reply all
Reply to author
Forward
0 new messages