0

I've been searching for it for a very long time and can't seem to find any relevant items (I know about the VLC plugin and I don't think it supports sound effects for video games). I need something similar like FMOD or Bass (or an NPAPI wrapper for these two) or a DirectSound NPAPI plugin, or just anything as long as it can support loading .wav, .ogg, .mp3, .m4a, etc. and can play those sounds in multiple instances.

EDIT: The reason I'm trying the NPAPI route is because the Web Audio API isn't really ready for primetime yet. I already tried Chrome's implementation and it has a bit of latency when playing the sounds (and multiple instances of sounds). It's even hard (or maybe impossible) to pause-play sounds with the current API spec. I also tried Flash (via SoundManager 2) and it also suffers from latency. It's fine for games but not good for making music applications such as a drum sampler. I hope this clarifies. (Sorry for my English, it's not my first language)

Cliffmeister
  • 161
  • 10
  • 1
    any you want an npapi plugin instead of using existing html5, flash, etc because...? – taxilian Oct 17 '13 at 17:39
  • I already tried the Web Audio API and Flash (via SoundManager 2) and there is some latency when playing the sounds. I also made a hack out of the plain audio element, cycling them per iteration but then it only works well for firefox 4 (higher versions of firefox and google chrome crash when multiple audio elements are created). – Cliffmeister Oct 18 '13 at 01:41
  • Here's a demo (http://www.youtube.com/watch?v=6p8FTP_wHBw) of the Firefox 'audio element hack' sound library that I made. It's being used by the 'Kontroller Press Play' drum sampler app that I made. It's running on Firefox 4 (portable) – Cliffmeister Oct 18 '13 at 01:48
  • There are quite a few Flash games out there, so i imagine proper and relatively low-latency sound should be possible with it. – Georg Fritzsche Oct 20 '13 at 12:09
  • @GeorgFritzsche browser to flash plugin communication is not really that fast. Try SoundManager 2 to see what I mean. – Cliffmeister Oct 22 '13 at 01:36

1 Answers1

0

I don't know of any existing plugins that will do what you want, but if you have some good c++ experience you could build a plugin to do that with FireBreath. The sound playback functionality you'd have to implement yourself, though.

Keep in mind that Chrome has announced plans to stop supporting plugins by the end of 2014 and Firefox will be blocking them by default starting in firefox 26, requiring users to specifically enable any plugins used on a page before they will work. You also have the "fun" install issue.

In short, if you can do something without a plugin you should absolutely not be using a plugin.

taxilian
  • 14,229
  • 4
  • 34
  • 73
  • I'm aware of FireBreath, but I don't have any c++ know-how to create a plugin. I also know about Chrome ditching NPAPI support (which, I think, is a bad move), and Firefox's 'click-to-enable' approach seems tolerable. I wouldn't normally settle for a plugin route (see my 'audio-element-hack' which I did for Firefox 4) unless the current set of technologies required for my apps/games aren't 'reliable' yet, as is the case for the current Web Audio API spec implementation. – Cliffmeister Oct 18 '13 at 03:24
  • I don't know of any existing options, unless quicktime might work for you. – taxilian Oct 18 '13 at 16:12