processing / processing-sound

Audio library for Processing built with JSyn
https://processing.org/reference/libraries/sound/
GNU Lesser General Public License v2.1
149 stars 50 forks source link

Document USB audio interface support via ASIO on Windows #87

Open kevinstadler opened 1 year ago

kevinstadler commented 1 year ago

21ca5b8273f7f1b973218d4bca8590eb6801824e adds support for ASIO devices on Windows (through PortAudio). By default the Sound library will try to stick to JavaSound drivers if possible, so some multi-channel interfaces might only be listed as stereo devices unless PortAudio is loaded explicitly by a call to MultiChannel.usePortAudio() at the beginning of the sketch (see the MultiChannelOutput example for details).

Since output devices can now also be selected by name matching, the following two lines should usually suffice to load the PortAudio interface and select the ASIO device for input/output:

MultiChannel.usePortAudio();
Sound.outputDevice("ASIO");
//Sound.inputDevice("ASIO");

In order to expand the list of supported audio interfaces (as well as latency/buffer configuration caveats) in the README, please report any experiences (positive and negative) with using audio interfaces over the ASIO device in this issue.

kevinstadler commented 1 year ago

Just a note that audio input from WDM-KS devices does also not seem to be supported on the currently bundled PortAudio binaries, and trying to open an AudioInputStream on one even seems to trash the JSyn SynthesisEngine object permanently (see cc2c8c3)