Выбрать главу

That last sentence sums it up quite well. Unix had a limited range of hardware to support; Linux has hundreds of sound cards. Sound card device driver support has been long lacking from manufacturers, and there is still no single standard for the sound subsystem in Linux.

In this section, you learn about sound cards, sound file formats, and the sound applications provided with Fedora.

Sound Cards

Fedora supports a wide variety of sound hardware and software. Two models of sound card drivers compete for prominence in today's market:

► ALSA, the Advanced Linux Sound Architecture, which is entirely open source

► OSS, the Open Sound System, which offers free and commercial drivers

Fedora uses ALSA because ALSA is the sound architecture for the 2.6 series kernels.

ALSA supports a long list of sound cards. You can review the list at http://www.alsa-project.org/alsa-doc/. If your sound card is not supported, it might be supported in the commercial version of OSS. You can download a trial version of commercial software and test your sound card at http://www.opensound.com/download.cgi.

Fedora detects most sound cards during the original installation. If you add or replace a sound card after the initial install, the Kudzu New Hardware Configuration utility automatically detects and configures it at the next reboot. To configure the sound card at any other time, use the system-config-soundcard graphical tool. The graphical tool can be found under the System, Administration menu as the Soundcard Detection menu item.

Adjusting Volume

Fedora now benefits from the inclusion of PulseAudio, a new way of controlling sound across Fedora. Instead of having a single global volume level, PulseAudio allows you to tailor each program to your specific needs. You may want to have music played at a louder volume than video; this is easy to do with PulseAudio, which is found under Applications, Sound and Video, as seen in Figure 7.14.

FIGURE 7.14 Control the volume level for each application that is currently handling sound with the volume slider.

You can also set the global output volume by using the slider found under the Output tab.

Alternatively you can control all the output volumes for the system to make sure that you have set everything to your taste, as shown in Figure 7.15. To access the volume control, right-click on the speaker icon and select Open Volume Control.

FIGURE 7.15 Use the volume control to manage volume settings for all your sound output devices.

Sound Formats

A number of formats exist for storing sound recordings. Some of these formats are associated with specific technologies, and others are used strictly for proprietary reasons. Fedora supports several of the most popular sound formats, including

► raw (.raw) — More properly known as headerless format, audio files using this format contain an amorphous variety of specific settings and encodings. All other sound files contain a short section of code at the beginning — a header — that identifies the format type.

► MP3 (.mp3) — A popular, but commercially licensed, format for the digital encoding used by many Linux and Windows applications. MP3 is not supported by any soft ware included with Fedora (which advises you to use the open source Ogg-Vorbis format instead).

► WAV (.wav) — The popular uncompressed Windows audio-visual sound format. It is often used as an intermediate file format when encoding audio.

► Ogg-Vorbis (.ogg) — Fedora's preferred audio encoding format. You enjoy better compression and audio playback, and freedom from lawsuits when you use this open-source encoding format for your audio files.

NOTE

Because of patent and licensing issues, Fedora has removed support for the MPEG, MPEG2, and MPEG3 (MP3) file formats in Fedora Linux. Although we cannot offer any legal advice, it appears that individuals using MP3 software are okay; it is just that Fedora cannot distribute the code because it sells its distribution. It seems — at this point — perfectly all right for you to obtain an MP3-capable version of Xmms (for example), which is a Winamp clone that plays MPEG1/2/3 files. You can get Xmms directly from http://www.xmms.org/ because that group has permission to distribute the MP3 code.

You can also enable the MP3 codec within Fedora by using the livna.org yum repository. You do this by installing the gstreamer-plugins-mp3 package, which enables the MP3 codec in all the GNOME applications.

Another alternative is to use the Ogg-Vorbis format; it is completely free of restrictions. A ripper for CD music is available from http://www.thekompany.com/projects/tkcoggripper/ and an MP3-to-Ogg converter is available from http://faceprint.com/ code/. Or, you could download and install the non-crippled versions of multimedia applications from FreshRPMs athttp://www.freshrpms.net/.

Fedora includes software (such as the sox command used to convert between sound formats) so that you can more easily listen to audio files provided in a wide variety of formats, such as AU (from NeXT and Sun), AIFF (from Apple and SGI), IFF (originally from Commodore's Amiga), RA (from Real Audio), and VOC (from Creative Labs).

TIP

To learn more about the technical details of audio formats, read Chris Bagwell's Audio Format FAQ athttp://www.cnpbagwell.com/audio.html.

Fedora also offers utilities for converting sound files from one format to another. Conversion utilities come in handy when you want to use a sound in a format not accepted by your current application of choice. A repository of conversion utilities resides at http://ibiblio.org/pub/linux/apps/sound/convert/!INDEX.html and includes MP3 and music CD-oriented utilities not found in Fedora. You have to know how to compile and install from source, however. If you see something useful, have a look at http://www.rpmfind.net/ to locate a binary RPM if you don't feel up to the task.

Fedora does provide sox, a self-described sound translator that converts music among the AIFF, AU, VAR, DAT, Ogg, WAV, and other formats. It also can be used to change many other parameters of the sound files.

Timidity is a MIDI-to-WAV converter and player. If you are interested in MIDI and musical instruments, Timidity is a handy application; it handles karaoke files as well, displaying the words to accompany your efforts at singing.

Viewing Video

You can use Fedora tools and applications to view movies and other video presentations on your PC. This section presents some TV and motion picture video software tools included with the Fedora distribution you received with this book.

TV and Video Hardware

To watch TV and video content on your PC, you must install a supported TV card or have a video/TV combo card installed. A complete list of TV and video cards supported by Fedora is athttp://www.exploits.org/v41/.