Sometimes after upgrading from an earlier version of Ubuntu to Ubuntu 10.04 (Lucid Lynx), all sound output is lost or it's extremely quiet.
To resolve this issue, open a terminal window and run the following:
Increase the sliders of "Master" and "Speaker" volume to maximum and it should work again.