Low-level audio in Electron


#1

I’m investigating Electron as the basis for a new radio automation platform. In order for this to work, I will need the ability to select specific sound card inputs and outputs. I’m not new to Node development, but Electron is a recent addition to my arsenal of tools.

If anyone knows how to handle this inside of the Web Audio API (or can suggest a module that will help), I’d be grateful. The basic requirements are:

  • A stable, cross-platform API with precise timing. (I’m targeting OS-X, Linux, and possibly Windows.)
  • The ability to play back any audio format that is supported by the host OS, with multiple sample rates (mostly 44.1 / 48khz).

#2

When I was writing my musicplayer library I mostly used MDN as a reference. Also if you search for “web audio tutorial” you should find quite a lot of info. Unfortunately, the Web Audio API doesn’t seem to provide the possibility to choose the soundcard or the sampling frequency. All in all, you might want to search for something like ALSA/CoreAudio/ASIO wrappers for node if you need low-level audio management.
NOTE: native modules are a real pain in the proverbial to get them working in electron. Trust me.