There are several different sound framework under many unix variants. Typically the framework used by the program talks to the framework that can talk to the hardware. If some programs have sound and others don't, the most likely explanation is that the non-working programs are using a sound system that is not working. Commands like
lsmod might be helpful if you had a hardware problem, but they're not likely to be relevant if you have a sound framework problem.
Common sound frameworks include OSS (older Linux kernel interface), ALSA (newer Linux kernel interface), Pulseaudio (the default on Ubuntu, supported by more and more programs), aRts (mostly used by older versions of KDE), ESound (esd) (older versions of Gnome and many older programs), JACK (supported directly only by a few high-end applications), and more.
Here is some information that you should include in a question like this one.
- Your operating system (e.g. Ubuntu 10.04, OpenBSD 4.7, …). This is something you should always indicate when asking a unix question (even on a distribution-specific forum, indicate the version).
- What sound framework(s) you've installed and how you configured it/them. (“Whatever is installed by default, I didn't knowingly change anything” is a valid answer.)
- What sound framework the non-working program is using. This may be hard for you to figure out; if you can't find the answer, give as much data as you can (e.g. “I'm using the binary downloaded from http://example.com/foo.zip”), so that people can look it up for themselves or suggest more places for you to look.
- This may be mentioned in the program's documentation.
- It may depend on compile-time options, so check the place where you got the program.
- The program may have a way to switch between sound frameworks on the command line or in a configuration file.
- If the program came in a package (deb, rpm, pkg, etc.), the package's dependencies should include a sound framework.
ldd /path/to/executable. This command will display the shared libraries the program is using; hopefully one of them corresponds to the sound framework.
- If there are any error messages, report them (copy and paste). Check if the program has a log file somewhere, or if there's an option for it to produce more detailed error messages.
If you give more information and I have more to contribute, I'll edit this answer.