[ Pobierz całość w formacie PDF ]
.The more samples that are taken persecond, and the more bits used to store each sample, the better the results.Standard telephone-quality sound can beachieved with 8000 samples per second, using 8 bits to store each sample.Sound reproduction equivalent in quality tothat of an audio CD requires 44,000 16-bit samples per second.Fortunately, you don't have to worry about this very often.In most cases, your audio software can figure out what typeof file you are feeding it, and make any necessary conversions to get it to play on your system.Here is a list of some of the most common audio file types:Table 3.1.Common audio file types.File ExtensionDescription.au NeXT or Sun audio file.snd Mac, NeXT, PC or Sun sound file.aif,.aiff,.aifc Apple or SGI sound file.voc Sound Blaster sound file.wav Microsoft (windows) sound file.iff,.mod,.nst Amiga sound fileThese days, the most common types of sound files you will find on the Internet are Sun audio files and Macintoshsound files.The hardware you need to play audio files comes as standard equipment on all Macintoshes, most Sun workstations,and on many other personal computer and workstation brands.The hardware required to play sounds is not present,however, on many PCs.To get reasonably good quality sound from a PC, you will need to invest in a sound card andexternal speakers.Note: All of the current Sun workstation offerings (except for the older SPARC Classic) include 16-bit audio.Sun's internal speakers are capable of AM-radio quality (unlike PC speakers).External speakers are required forCD-quality sound.Many software packages, both public domain and commercial, are available to convert and play audio files on variousplatforms.There are too many packages to list them all, so I will mention just a few for each of the major platforms.I'lltry to pick packages that are commonly used, easily available, and reasonably powerful, but don't be surprised if I'veleft your favorite off the list.If the package I've chosen doesn't suit you, read the Audio File Formats FAQ from thealt.binaries.sounds.d Usenet newsgroup and pick one that is more to your taste.You should also consult the FAQ if youhave an audio-capable system that I don't mention here, such as a DEC VAXstation 4000.PC Audio SoftwareTo get reasonable quality sound out of a PC, you will need to invest in a sound card and external speakers.If you wantto listen to Sun or Macintosh sound files on a PC, you will need to find some audio conversion software, such as SOX,WHAM, or wplany.SOX (SOund eXchange) converts between most common audio file types.The PC version of SOX is available from:http://docs.rinet.ru/ITricks/tig03.htm (4 of 25) [4/18/1999 12:37:34 AM]Tricks of the Internet Gurus tig03.htmftp.cwi.nl:/pub/audio/sox5dos.zipWHAM (Waveform Hold and Modify) is a Windows 3.1 application for manipulating and playing sound files.ftp.ncsa.uiuc.edu:/Web/Mosaic/Windows/viewers/wham131.zipWplany is an audio player that works with the built-in PC speaker.ftp.ncsa.uiuc.edu:/PC/Mosaic/viewers/wplny09b.zipMacintosh Audio SoftwareSupport for sound is built into all Macintoshes, and if you are running System 7, you can play Mac sound files bydouble-clicking on them in the Finder.For other types of sound files, however, you'll need to get a sound conversionutility such as SoundMachine or SoundExtractor.SoundMachine reads and plays most common sound formats.sumex-aim.stanford.edu:/info-mac/snd/util/sound-machine-21.hqxSoundExtractor reads, plays, and converts between most common sound formats.sumex-aim.stanford.edu:/info-mac/snd/util/sound-extractor-131.hqxUNIX Audio SoftwareSun Workstations include sound support, although the mechanism for playing Sun sound files varies from one releaseof SunOS or Solaris to another.On some systems, the built-in sound command is "play," on others it is "audioplay" or"audiotool," and on a few Suns, you may have to resort to the rather ugly cat > /dev/audio.Sun's Audio Tool is shown in Figure 3.1.Figure 3.1.Sun's Audio Tool.SOX (SOund eXchange) runs on most UNIX systems and converts between most common audio file types.SOXsource code was posted in eight parts to the alt.sources Usenet newsgroup, and is available from:ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.12.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.13.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.14.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.15.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.16.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.17.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.18.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.19.2ftp.sterling.com:/usenet/alt.sources/volume93/Jul/930726.20.2Image Fileshttp://docs.rinet.ru/ITricks/tig03.htm (5 of 25) [4/18/1999 12:37:34 AM]Tricks of the Internet Gurus tig03.htmTable 3.2 shows some of the most common image file types.Table 3.2.Common image file types.File ExtensionDescription.bmp Windows or OS/2 bit-mapped picture file.gif CompuServe's Graphics Interchange Format.im8,.img Sun Image file.jpe,.jpg,.jpeg Joint Photography Experts Group file.pcx PC Paintbrush file.pict Macintosh QuickDraw PICTure file.eps,.ps (Encapsulated) PostScript file.tif,.tiff Tagged Image Format File.xbm,.xwd X Window BitMap, X Window Dump files.pbm,.ppm,.pgm Portable BitMap, PixMap and GreyMap formatsThese days, GIF is the most popular image format on the Internet, with JPEG running a close second.Both GIF andJPEG images can be viewed on many different platforms, and they have built-in compression to reduce the size of theimage files.GIF images can have a maximum of 256 colors.While not as popular as GIFs, JPEG images are becoming more and more common on the Net.JPEG uses a lossycompression format, which means that small amounts of image data are sacrificed to offer much better compression.JPEG files are often much smaller than comparable GIF images, with negligible loss of quality.JPEG images can haveup to 16.7 million different colors.The next most common image file type you are likely to find on the Internet is PostScript.PostScript is aspecial-purpose language used to describe printed pages in a device- and resolution-independent manner.PostScriptfiles can contain image data, as well as text and printer commands (such as a command to put a printer into duplexmode).Because of its complexity, only a handful of programs can successfully deal with PostScript.These includeGhostScript, GhostView, Adobe Illustrator, and Abode's Display PostScript.Both GIF and JPEG are raster image formats.Raster images are stored as a rectangular array of dots, or pixels (pictureelements).Vector images, on the other hand, are stored as a sequence of drawing operations.Raster formats (sometimescalled paint files) are more common than vector formats (sometimes called draw files).Converting from a vectorformat to a raster is fairly easy, as is converting from one type of raster image to another.It's much harder to convert araster image into vector format.Some images are monochrome, others are greyscale or 4-, 8-, 16- or 24-bit color.The nicest and largest files you arelikely to come across are 24-bit color (sometimes called true color).More than likely you won't have the videohardware needed to display 24-bit color images, so your image display software will convert them down to 8-bit color.Image files are big, and most of the image file types support one or more compression schemes to reduce the files to amore manageable (but still large) size.In monochrome images, each pixel is represented by a single bit of computer storage
[ Pobierz całość w formacie PDF ]