vscode

VSCode, Ubuntu Snaps and ALSA Sound Development

Here at McLaren Labs we like to try all sorts of tools and development environments to see how they work together. We’ve been using vscode (https://code.visualstudio.com/) on and off for about a year, but only recently decided to try using it for a more complete edit/debug/run cycle for an Objective-C Synthesizer project. We ran into an unexpected interaction between the Snap environment of vscode and the ALSA (Advanced Linux Sound Architecture) PCM interface.

The Symptoms

What we discovered was that when running a program that attempted to access an ALSA sound device was that the program malfunctioned. It worked correctly in a “normal” terminal, however.

We reproduced the behavior using the default aplay command that is available in alsa-utils. See the screenshot below for what should appear in a terminal when it is run, playing an Ubuntu standard sound called “Front-Left”. Unless otherwise specified, this command opens the “default” sound device.

If your Ubuntu sound system is set up correctly, you will hear a woman saying “Front Left” … and it will come out of your front-left speaker.

Read More »VSCode, Ubuntu Snaps and ALSA Sound Development