www.pudn.com > Audio.rar > DAC_CODEC.h, change:2008-12-19,size:5854b


/*---------------------------------------------------------------------------- 
 * Name:    DAC_CODEC.h 
 * Purpose: Header file of speaker driver using DAC  
 * Version: V1.00 
 *---------------------------------------------------------------------------- 
 * This file is part of the uVision/ARM development tools. 
 * This software may only be used under the terms of a valid, current, 
 * end user licence from KEIL for a compatible version of KEIL software 
 * development tools. Nothing else gives you the right to use this software. 
 * 
 * Copyright (c) 2005-2008 Keil Software. All rights reserved. 
 *---------------------------------------------------------------------------*/ 
 
/* Define to prevent recursive inclusion -------------------------------------*/ 
#ifndef __DAC_CODEC_H 
#define __DAC_CODEC_H 
 
/* .WAV file format : 
 
 Endian      Offset      Length      Contents 
  big         0           4 bytes     'RIFF'             // 0x52494646 
  little      4           4 bytes     <file length - 8> 
  big         8           4 bytes     'WAVE'             // 0x57415645 
 
Next, the fmt chunk describes the sample format: 
 
  big         12          4 bytes     'fmt '          // 0x666D7420 
  little      16          4 bytes     0x00000010      // Length of the fmt data (16 bytes) 
  little      20          2 bytes     0x0001          // Format tag: 1 = PCM 
  little      22          2 bytes     <channels>      // Channels: 1 = mono, 2 = stereo 
  little      24          4 bytes     <sample rate>   // Samples per second: e.g., 22050 
  little      28          4 bytes     <bytes/second>  // sample rate * block align 
  little      32          2 bytes     <block align>   // channels * bits/sample / 8 
  little      34          2 bytes     <bits/sample>   // 8 or 16 
 
Finally, the data chunk contains the sample data: 
 
  big         36          4 bytes     'data'        // 0x64617461 
  little      40          4 bytes     <length of the data block> 
  little      44          *           <sample data> 
 
*/ 
 
/* Includes ------------------------------------------------------------