------------------------------------------------------------
Microsoft Readme File for the WMAL2PCM Sample
February 2003
(c) Microsoft Corporation, 2003. All rights reserved.
------------------------------------------------------------


This document provides information about the WMAL2PCM sample.

----------------------
DESCRIPTION
----------------------
This tool converts files that are encoded in the lossless Windows Media Audio (WMA) format back into the original PCM WAV format. 

----------------------
SYSTEM REQUIREMENTS
----------------------
Microsoft(r) Windows(r) 2000 and Windows XP. Windows XP is required for the playback of multichannel, high-resolution content.

----------------------
USAGE
----------------------

At the command prompt, type:
wmal2pcm [input.wma] [output.wma] [-ext]
	input.wma	Specifies the WMA file to convert.
	output.wav	Specifies the output wav file.
	-ext 		Force the decoder to use the WAVFORMATEXTENSIBLE structure for the output media type.

When using this tool, the output file attributes will match those of the input file. The only exception occurs if the -ext switch is used. In this case, the format of the output file will be described using a WAVEFORMATEXTENSIBLE structure, even if the original format used WAVEFORMATEX. The WAVEFORMATEXTENSIBLE structure maintains the original sampling rate, bit depth, and number of channels. 

You can specify a directory, instead of a file name, for both the input and output name parameters. When using a directory as the input, the tool will only convert files that are saved in a lossless format in that directory. None of the other files in that directory will be converted or altered in any way.

If you supply no parameters, wmal2pcm displays usage information.

----------------------
EXAMPLES
----------------------
The following example converts the audio content in a file named file.wma to the original audio format stored in a file named newfile.wav.

     wmal2pcm file.wma newfile.wav

The following example converts the lossless audio content from all files in the directory \\machine\directory to new WAV files in the directory \\machine\newdirectory. If the destination directory does not exist, the tool will create it.

     wmal2pcm \\machine\directory \\machine\newdirectory 

The following example converts all files in a directory, like the previous example. In this example, the format of the content in all output files is described using the WAVEFORMATEXTENSIBLE structure. By default, the codec will use an unextended WAVEFORMATEX structure for formats with one or two channels (but mono for lossless encoding is not supported), a sample rate of 48 kHz or less, and a sample depth of 16 bits or less. An audio stream with more than 16 bits per sample, more than 2 channels, or a sample rate in excess of 48 kHz is always described using the WAVEFORMATEXTENSIBLE structure, regardless of the presence or absence of the -ext switch on the command line.

     wmal2pcm \\machine\directory \\machine\newdirectory -ext


