ALSA

~/.asoundrc
This file can be optionally used so that on a per-user basis, ALSA defaults can be overridden. You might have special hardware, or card 0 and device 0 (the defaults) are not going to work for you.

One of the simplest changes is card and device. This is the case for me with an HDMI coming from an Nvidia card connected to an onboard Realtek ALC88* audio device.

You can find out what devices and cards you have with:

Sound mixing inconsistent
Sometimes one app essentially takes over all sound devices. This might even be for performance reasons.

Force the use of dmix instead of direct audio output (which is what most things use by default, such as Flash (which really means your browser) and Wine).

If your device is card 1 and device 7 (which is the case for Nvidia HDMI for me):

Use of ~/.asoundrc is immediate and as long as you are not forcing the use of specific devices in any applications, they either will require a restart or will begin working immediately. One of the best tests is to run Chrome, go to YouTube, open a terminal, run mplayer with an audio or video file and see that you do not get an error about audio (such an error might be 'Device or resource busy').

Tips
Try one of the many configuration options in PaulBredbury's asoundrc file.