Why does aplay work when pulseaudio is running and else not?

Leon picture Leon · Aug 25, 2011 · Viewed 7.1k times · Source

I have a ubuntu install with pulseaudio default installed. When pulseaudio is running this works: aplay -D hw:2,7 /usr/share/xbmc/sounds/Bursting\ Bubbles/nav.wav

But when no pulseaudio daemon is running it doesn't. The command doesn't give an error but I can't hear a sound.

hw:2,7 is a Nvidia hdmi device.

Why is this? I can't figure it out.

Answer

O.C. picture O.C. · Aug 25, 2011

Read this link.

It states that alsa (aplay) is configured to send its output to pulseaudio (which is your sound server) by default.

When your sound server is not running you will not be able to hear a sound as you have observed.

See also "PulseAudio Removal"section to detach it from alsa.

I hope this helps.