12228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 22228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/* ----------------------------------------------------------------------------------------------------------- 32228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectSoftware License for The Fraunhofer FDK AAC Codec Library for Android 42228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 54f0d97057c5c640b25518358886f8c47da9fc052Jean-Michel Trivi� Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur F�rderung der angewandten Forschung e.V. 62228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project All rights reserved. 72228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 82228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1. INTRODUCTION 92228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectThe Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements 102228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectthe MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. 112228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectThis FDK AAC Codec software is intended to be used on a wide variety of Android devices. 122228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 132228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectAAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual 142228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectaudio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by 152228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectindependent studies and is widely deployed. AAC has been standardized by ISO and IEC as part 162228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectof the MPEG specifications. 172228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 182228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectPatent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) 192228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectmay be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners 202228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectindividually for the purpose of encoding or decoding bit streams in products that are compliant with 212228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectthe ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license 222228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectthese patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec 232228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectsoftware may already be covered under those patent licenses when it is used for those licensed purposes only. 242228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 252228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCommercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, 262228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectare also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional 272228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectapplications information and documentation. 282228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 292228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project2. COPYRIGHT LICENSE 302228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 312228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectRedistribution and use in source and binary forms, with or without modification, are permitted without 322228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectpayment of copyright license fees provided that you satisfy the following conditions: 332228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 342228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectYou must retain the complete text of this software license in redistributions of the FDK AAC Codec or 352228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectyour modifications thereto in source code form. 362228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 372228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectYou must retain the complete text of this software license in the documentation and/or other materials 382228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectprovided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. 392228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectYou must make available free of charge copies of the complete source code of the FDK AAC Codec and your 402228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectmodifications thereto to recipients of copies in binary form. 412228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 422228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectThe name of Fraunhofer may not be used to endorse or promote products derived from this library without 432228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectprior written permission. 442228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 452228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectYou may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec 462228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectsoftware or your modifications thereto. 472228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 482228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectYour modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software 492228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectand the date of any change. For modified versions of the FDK AAC Codec, the term 502228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term 512228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." 522228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 532228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project3. NO PATENT LICENSE 542228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 552228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectNO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, 562228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with 572228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectrespect to this software. 582228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 592228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectYou may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized 602228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectby appropriate patent licenses. 612228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 622228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project4. DISCLAIMER 632228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 642228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectThis FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors 652228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties 662228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectof merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 672228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, 682228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectincluding but not limited to procurement of substitute goods or services; loss of use, data, or profits, 692228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projector business interruption, however caused and on any theory of liability, whether in contract, strict 702228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectliability, or tort (including negligence), arising in any way out of the use of this software, even if 712228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectadvised of the possibility of such damage. 722228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 732228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project5. CONTACT INFORMATION 742228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 752228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectFraunhofer Institute for Integrated Circuits IIS 762228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectAttention: Audio and Multimedia Departments - FDK AAC LL 772228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectAm Wolfsmantel 33 782228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project91058 Erlangen, Germany 792228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 802228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectwww.iis.fraunhofer.de/amm 812228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectamm-info@iis.fraunhofer.de 822228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project----------------------------------------------------------------------------------------------------------- */ 832228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 842228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/************************** Fraunhofer IIS FDK SysLib ********************** 852228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 862228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project Author(s): Eric Allamanche 872228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 882228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project******************************************************************************/ 892228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 902228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** \file wav_file.h 912228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Rudimentary WAVE file read/write support. 922228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 932228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * The WAVE file reader/writer is intented to be used in the codec's example 942228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * framework for easily getting started with encoding/decoding. Therefore 952228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * it serves mainly for helping quickly understand how a codec's API actually 962228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * works. 972228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * Being a WAVE file reader/writer with very basic functionality, it may not be 982228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * able to read WAVE files that come with unusual configurations. 992228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * Details on how to use the interface functions can be found in every 1002228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * (encoder/decoder) example framework. 1012228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 1022228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1032228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#ifndef __WAV_FILE_H__ 1042228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#define __WAV_FILE_H__ 1052228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1062228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1072228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1082228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#include "genericStds.h" 1092228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1102228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#ifdef __cplusplus 1112228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectextern "C" { 1122228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#endif 1132228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 114577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_FRONT_LEFT 0x1 115577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_FRONT_RIGHT 0x2 116577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_FRONT_CENTER 0x4 117577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_LOW_FREQUENCY 0x8 118577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_BACK_LEFT 0x10 119577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_BACK_RIGHT 0x20 120577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40 121577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80 122577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_BACK_CENTER 0x100 123577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_SIDE_LEFT 0x200 124577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_SIDE_RIGHT 0x400 125577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_TOP_CENTER 0x800 126577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_TOP_FRONT_LEFT 0x1000 127577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_TOP_FRONT_CENTER 0x2000 128577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_TOP_FRONT_RIGHT 0x4000 129577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_TOP_BACK_LEFT 0x8000 130577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_TOP_BACK_CENTER 0x10000 131577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_TOP_BACK_RIGHT 0x20000 132577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi#define SPEAKER_RESERVED 0x80000000 133577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi 1342228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/*! 1352228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * RIFF WAVE file struct. 1362228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * For details see WAVE file format documentation (for example at http://www.wotsit.org). 1372228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 1382228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projecttypedef struct WAV_HEADER 1392228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project{ 140577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi char riffType[4]; 1412228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project UINT riffSize; 142577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi char waveType[4]; 143577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi char formatType[4]; 1442228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project UINT formatSize; 1452228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project USHORT compressionCode; 1462228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project USHORT numChannels; 1472228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project UINT sampleRate; 1482228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project UINT bytesPerSecond; 1492228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project USHORT blockAlign; 1502228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project USHORT bitsPerSample; 151577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi char dataType[4]; 1522228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project UINT dataSize; 1532228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project} WAV_HEADER; 1542228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1552228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectstruct WAV 1562228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project{ 1572228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project WAV_HEADER header; 1582228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project FDKFILE *fp; 159577fcbb570d023be4cea9564292dd2bd95f40c3bJean-Michel Trivi UINT channelMask; 1602228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project}; 1612228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1622228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projecttypedef struct WAV *HANDLE_WAV; 1632228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1642228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 1652228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Open a WAV file handle for reading. 1662228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 1672228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param pWav Pointer to a memory location, where a WAV handle is returned. 1682228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param filename File name to be opened. 1692228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 1702228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return 0 on success and non-zero on failure. 1712228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 1722228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectINT WAV_InputOpen (HANDLE_WAV *pWav, const char *filename); 1732228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1742228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 1752228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Read samples from a WAVE file. The samples are automatically re-ordered to the 1762228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * native host endianess and scaled to full scale of the INT_PCM type, from 1772228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * whatever BPS the WAVE file had specified in its header data. 1782228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 1792228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param wav Handle of WAV file. 1802228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param sampleBuffer Pointer to store audio data. 1812228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param numSamples Desired number of samples to read. 1822228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param nBufBits Size in bit of each audio sample of sampleBuffer. 1832228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 1842228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return Number of samples actually read. 1852228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 1862228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectINT WAV_InputRead (HANDLE_WAV wav, void *sampleBuffer, UINT numSamples, int nBufBits); 1872228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1882228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 1892228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Close a WAV file reading handle. 1902228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param pWav Pointer to a WAV file reading handle. 1912228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return void 1922228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 1932228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectvoid WAV_InputClose(HANDLE_WAV *pWav); 1942228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1952228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 1962228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Open WAV output/writer handle. 1972228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 1982228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param pWav Pointer to WAV handle to be returned. 1992228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param outputFilename File name of the file to be written to. 2002228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param sampleRate Desired samplerate of the resulting WAV file. 2012228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param numChannels Desired number of audio channels of the resulting WAV file. 2022228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param bitsPerSample Desired number of bits per audio sample of the resulting WAV file. 2032228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 2042228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return 0: ok; -1: error 2052228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 2062228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectINT WAV_OutputOpen(HANDLE_WAV *pWav, const char *outputFilename, INT sampleRate, INT numChannels, INT bitsPerSample); 2072228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 2082228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 2092228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Write data to WAV file asociated to WAV handle. 2102228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 2112228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param wav Handle of WAV file 2122228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param sampleBuffer Pointer to audio samples, right justified integer values. 2132228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param numberOfSamples The number of individual audio sample valuesto be written. 2142228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param nBufBits Size in bits of each audio sample in sampleBuffer. 2152228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param nSigBits Amount of significant bits of each nBufBits in sampleBuffer. 2162228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 2172228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return 0: ok; -1: error 2182228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 2192228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectINT WAV_OutputWrite(HANDLE_WAV wav, void *sampleBuffer, UINT numberOfSamples, int nBufBits, int nSigBits); 2202228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 2212228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 2222228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Close WAV output handle. 2232228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param pWav Pointer to WAV handle. *pWav is set to NULL. 2242228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return void 2252228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 2262228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectvoid WAV_OutputClose(HANDLE_WAV *pWav); 2272228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 2282228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#ifdef __cplusplus 2292228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project} 2302228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#endif 2312228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 2322228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 2332228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#endif /* __WAV_FILE_H__ */ 234