This has annoyed me for a long time, also. It particularly affects first startup of the computer.
Steps to reproduce:
1. Set your volume up reasonably high before shutdown, or otherwise ensure the volume levels are high in alsa at boot time
2. Reboot the machine
3. Log in
4. Arggh! The ubuntu login sound is breaking my brain! Smash the volume down or mute key several times
Expected result: The volume should reduce or mute, softening or eliminating the din
Actual result: The volume controls have no effect while the sound is playing, or for several seconds afterwards.
By the time the volume keys work the desktop is already up. This affects volume and mute keys on keyboards, and also "soft" volume controls on laptops such at the toshiba model my wife uses.
This bug may be targeted at the wrong package as noted by an earlier commenter: mixer_applet2 may be the place where this can be fixed. It remains a bug in the 10.04 beta version.