Alsa software devices support

Hi there,

The ALSA support of Juce is rock-solid and provides excellent low-latency performance. However, juce manages only the “hardware” ALSA devices (those listed by aplay -l), not the soft devices ( those listed by aplay -L). This prevents juce from being able to output to dmix, or pulse, or whatever custom config defined in ~/.asoundrc (take all of this with a grain of salt as I am not at all an alsa expert…)

As pulseaudio is now available in all linux distros, being able to use its alsa pseudo device would be nice (or dmix for those who can’t stand pulseaudio)

According to :

  • snd_device_name_hint should be used instead of snd_card_next etc when enumerating devices.
  • but this is not enough to make it work (I tried, and failed…)

Writing a pulseaudio backend would be an alternative solution , but the pulseaudio api does not seem really simpler than alsa , and the pulseaudio dev himself says that people should target the “pulse” alsa pseudo-device instead of the pulseaudio api.

Maybe I’ll try again to make it work in the future, if I have a chance to understand anything to the alsa api…