Message-Id: <3.0.1.16.19971209031624.188f4cf0@main.arcticnet.no> Date: Tue, 09 Dec 1997 03:16:24 To: Jose Luis Perandones Colino From: Ove Kaaven Subject: Re: [AL] Sound formats question Cc: allegro AT mail DOT canvaslink DOT com, djgpp AT delorie DOT com In-Reply-To: <3.0.32.19971208223141.00697684@195.53.80.2> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 22:31 08.12.97 +0100, Jose Luis Perandones Colino wrote: >I am making AVI extension for allegro (i have make part of video), but i >need the structures WAVEFORMATEX and PCMWAVEFORMAT, do someone help me?? >TIA. Microsoft Platform SDK mmsystem.h /* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */ #define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */ #define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */ #define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */ #define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */ #define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */ #define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */ #define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */ #define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */ #define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */ #define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */ #define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */ #define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */ #define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */ /* OLD general waveform format structure (information common to all formats) */ typedef struct waveformat_tag { WORD wFormatTag; /* format type */ WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) * DWORD nSamplesPerSec; /* sample rate */ DWORD nAvgBytesPerSec; /* for buffer estimation */ WORD nBlockAlign; /* block size of data */ } WAVEFORMAT, *PWAVEFORMAT, NEAR *NPWAVEFORMAT, FAR *LPWAVEFORMAT; /* flags for wFormatTag field of WAVEFORMAT */ #define WAVE_FORMAT_PCM 1 /* specific waveform format structure for PCM data */ typedef struct pcmwaveformat_tag { WAVEFORMAT wf; WORD wBitsPerSample; } PCMWAVEFORMAT, *PPCMWAVEFORMAT, NEAR *NPPCMWAVEFORMAT, FAR *LPPCMWAVEFORMAT; /* * extended waveform format structure used for all non-PCM formats. this * structure is common to all non-PCM formats. */ typedef struct tWAVEFORMATEX { WORD wFormatTag; /* format type */ WORD nChannels; /* number of channels (i.e. mono, stereo...) */ DWORD nSamplesPerSec; /* sample rate */ DWORD nAvgBytesPerSec; /* for buffer estimation */ WORD nBlockAlign; /* block size of data */ WORD wBitsPerSample; /* number of bits per sample of mono data */ WORD cbSize; /* the count in bytes of the size of */ /* extra information (after cbSize) */ } WAVEFORMATEX, *PWAVEFORMATEX, NEAR *NPWAVEFORMATEX, FAR *LPWAVEFORMATEX; typedef const WAVEFORMATEX FAR *LPCWAVEFORMATEX;