Forums

Re: I am back

Started by Ben Bradley October 2, 2005
On 1 Oct 2005 19:45:56 -0700, "Radium" <glucegen1@excite.com> wrote:

>dpierce@cartchunk.org wrote: > >> WAV is simply a specific container format for audio information. >> WAV files can hold linear PCM, non-linear PCM such as A-law or >> u-law, encodings such as MPEG, AC-3 and such. >> >> Thus, if you simply specify that something is in WAV format, you're >> only saying that it's a RIFF-format file and that it's internal >> format is unspecified. It could be linear PCM (wave format type 1), >> it could be MPEG (wave format type 80). >> >> Both linear PCM and MPEG ARE pulse-code modulations, meaning that >> at certain instants, the instantaneous amplitude of the is sampled >> and encoded. One of them simply has gone through some additional >> lossy encoding procedure. > > >I am confused now. > >http://www.adobe.com/support/techdocs/329133.html > >Here they show "Windows Pulse Code Modulation (PCM) data (.wav)" as >being diffrent from "Linear PCM"
I suspect they mean a "raw" data format for "Linear PCM" where the file just starts out with words of PCM data in some externally-agreed-upon format. Windows .wav files have something like 56 bytes of header info (the RIFF header thing) at the begining that tells what kind of data it is (linear PCM, ADPCM, etc), sample rate (you wouldn't want it to play back at the wrong speed, would you?), how many channels, how many bytes per sample, number of samples in the file, and other things I forget. The .wav format most often contains linear PCM and so is often equated to linear PCM, but it could contain something else.
Ben Bradley wrote:
> I suspect they mean a "raw" data format for "Linear PCM" where the > file just starts out with words of PCM data in some > externally-agreed-upon format.
No. If you read carefully, you'll find that the two raw formats [no headers] are .pcm and .raw. There is also the "64-bit raw doubles" which can be in .dbl or .raw format.
> The .wav format most often contains linear PCM and so is often > equated to linear PCM, but it could contain something else.
What else does it contain?
"Radium" <glucegen1@excite.com> wrote in message 
news:1128226952.926235.310520@z14g2000cwz.googlegroups.com...
> > Ben Bradley wrote: >> I suspect they mean a "raw" data format for "Linear PCM" where the >> file just starts out with words of PCM data in some >> externally-agreed-upon format. > > No. If you read carefully, you'll find that the two raw formats [no > headers] are .pcm and .raw. There is also the "64-bit raw doubles" > which can be in .dbl or .raw format. > >> The .wav format most often contains linear PCM and so is often >> equated to linear PCM, but it could contain something else. > > What else does it contain?
A wave file could have ADPCM (adaptive differential PCM) or 8-bit u-law or a-low companded audio. Maybe others too. See: http://support.microsoft.com/kb/q89879/ http://www.epanorama.net/documents/telecom/ulaw_alaw.html
"Jon Harris" <jon99_harris7@hotmail.com> wrote in message 
news:4yJ%e.8271$UD6.7374@trnddc04...
> "Radium" <glucegen1@excite.com> wrote in message > news:1128226952.926235.310520@z14g2000cwz.googlegroups.com... >> >> Ben Bradley wrote: >>> I suspect they mean a "raw" data format for "Linear PCM" where the >>> file just starts out with words of PCM data in some >>> externally-agreed-upon format. >> >> No. If you read carefully, you'll find that the two raw formats [no >> headers] are .pcm and .raw. There is also the "64-bit raw doubles" >> which can be in .dbl or .raw format. >> >>> The .wav format most often contains linear PCM and so is often >>> equated to linear PCM, but it could contain something else. >> >> What else does it contain? > > A wave file could have ADPCM (adaptive differential PCM) or 8-bit u-law or > a-low companded audio. Maybe others too. See: > http://support.microsoft.com/kb/q89879/ > http://www.epanorama.net/documents/telecom/ulaw_alaw.html
P.S. I should have added that a wave file is just a "container" that can contain a wide variety of audio formats, sample rates, bit widths, number of channels, etc.. The most common is your basic linear PCM, but that's certainly not the only possibility. People off use "wave file" to mean "uncompressed 44.1kHz 16-bit stereo audio file", but that is a pretty sloppy usage of the term.
Radium wrote:
> > The .wav format most often contains linear PCM and so is often > > equated to linear PCM, but it could contain something else. > > What else does it contain?
The question is not what it does contain, but what it could. First of all, WAV files MUST contain two parts, or "chunks" to be valid, and the contents of those chunks determine what is contained. fmt - format chunk Contains information about how the data is encoded, including sample size, number of channels, sample rate and, relevant to the current discussion, the format of the data. The layout of the minimum format chunk is: wFormatTag - format of audio data nChannel - number of channels nSamplesPerSec - sample rate nAvgBytesPerSec - average data rate nBlockAlign - block alignment in bytes of the data chunk wBitsPerSample - number of bits in each sample The fmt chunk can be extended to include more information especially regarding formats becide linear PCM. Examples of some of the audio formats that can be represented in WAV files are: Linear PCM ADPCM u-Law A-Law MPEG Dolby AC-2 There are a number of prorietary formats as well. data contains the actual audio, ecoded as described in the fmt chunk