sox not configured for pulseaudio when packaged in a snap

Bug #1593558 reported by Nathan Haines
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Invalid
Undecided
Unassigned

Bug Description

I am trying to snap package a whitenoise generator. It consists of a script that calls sox with a command line. Installing the package "sox" is its only dependency.

When running the installed snap, the following error occurs:

nhaines@savanna:~$ spacedrive
play FAIL sox: Sorry, there is no default audio device configured

At first, the only stage package was sox, attempts with and without libsox-fmt-pulse and pulseaudio were also tried with no success. The resultant

At last attempt, the following files are used:

root@spacedrive-snap:~/spacedrive-test# cat snap/usr/bin/spacedrive
#!/bin/sh
echo -n "\033]0;spacedrive\007"
AUDIODRIVER=Pulseaudio; play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14

root@spacedrive-snap:~/spacedrive-test# cat snapcraft.yaml
name: spacedrive
version: 0.1
summary: Generate a space travel engine for background noise
description: |
   Spacedrive simulates the soothing, rhythmic sound of a spaceship's
   space-time warp drive engines to help you concentrate or relax.
confinement: strict

apps:
  spacedrive:
    command: usr/bin/spacedrive
    plugs: [pulseaudio]

parts:
  spacedrive:
    plugin: copy
    files:
      spacedrive: usr/bin/spacedrive

  sox:
    plugin: nil
    stage-packages:
      - sox
      - libsox-fmt-pulse
      - pulseaudio

Revision history for this message
Nathan Haines (nhaines) wrote :
Revision history for this message
John Lenton (chipaca) wrote :

Sorry it's taken so long to get to this.
I'm not at all clear as to why this is a bug in snappy.
Please reopen with more details if it's still an issue.

Changed in snappy:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.