?? audio.h
字號:
/**********************************************************************MPEG-4 Audio VMAudio i/o moduleThis software module was originally developed byHeiko Purnhagen (University of Hannover)and edited byin the course of development of the MPEG-2 NBC/MPEG-4 Audio standardISO/IEC 13818-7, 14496-1,2 and 3. This software module is animplementation of a part of one or more MPEG-2 NBC/MPEG-4 Audio toolsas specified by the MPEG-2 NBC/MPEG-4 Audio standard. ISO/IEC givesusers of the MPEG-2 NBC/MPEG-4 Audio standards free license to thissoftware module or modifications thereof for use in hardware orsoftware products claiming conformance to the MPEG-2 NBC/ MPEG-4 Audiostandards. Those intending to use this software module in hardware orsoftware products are advised that this use may infringe existingpatents. The original developer of this software module and his/hercompany, the subsequent editors and their companies, and ISO/IEC haveno liability for use of this software module or modifications thereofin an implementation. Copyright is not released for non MPEG-2NBC/MPEG-4 Audio conforming products. The original developer retainsfull right to use the code for his/her own purpose, assign or donatethe code to a third party and to inhibit third party from using thecode for non MPEG-2 NBC/MPEG-4 Audio conforming products. Thiscopyright notice must be included in all copies or derivative works.Copyright (c) 1996.Header file: audio.h$Id: audio.h,v 1.1.1.2 1998-05-07 17:21:17+03 suonio Exp $Required libraries:libtsp.a AFsp audio file libraryRequired modules:common.o common moduleAuthors:HP Heiko Purnhagen, Uni Hannover <purnhage@tnt.uni-hannover.de>Changes:21-jan-96 HP born (using AFsp-V2R2)19-feb-97 HP made internal data structures invisible**********************************************************************//**********************************************************************The audio i/o module provides an interface to the basic functions forPCM audio data stream input and output.The current implementation of the audio i/o module is based on theAFsp audio library. Other implementations of this module are possibleas long as the basic functions required by the MPEG-4 Audio VMframework are provided. Optional functions could be substituted bydummy functions and optional parameters could be ignored. The VMframework uses only sequential access to the input and output audiodata streams. The seek function is only use for initial compensationof the coding delay in the encoder and decoder.Basic functions and parameters required by the VM framework:AudioOpenRead(): fileName, numChannel, fSampleAudioOpenWrite(): fileName, numChannel, fSampleAudioReadData(): file, data, numSampleAudioWriteData(): file, data, numSampleAudioClose(): fileNOTE: For multi channel audio files, the number of samples per channel (numSample) is used as parameter!!! The total number of samples (numSample*numChannel) is not used here.**********************************************************************/#ifndef _audio_h_#define _audio_h_/* ---------- declarations ---------- */
struct AudioFileStruct /* audio file handle */
{
int numChannel; /* number of channels */
long currentSample; /* number of samples read/written */
/* (samples per channel!) */
unsigned int bufferp[2/*MAXCHANNELS*/];
unsigned int data_size;
char sample_buffer[4096];
};
typedef struct AudioFileStruct AudioFile; /* audio file handle */
extern AudioFile *outfd;
/* ---------- functions ---------- */#ifdef __cplusplusextern "C" {#endif/* AudioOpenWrite() *//* Open audio file for writing. *//* Sample format: 16 bit twos complement, uniform quantisation */AudioFile *AudioOpenWrite ( int numChannel, /* in: number of channels */ float fSample); /* in: sampling frequency [Hz] */ /* returns: */ /* audio file (handle) */ /* or NULL if error *//* AudioWriteData() *//* Write data to audio file. */void AudioWriteData ( AudioFile *file, /* in: audio file (handle) */ float **data, /* in: data[channel][sample] */ /* (range [-32768 .. 32768]) */ long numSample); /* in: number of samples to be written */ /* (samples per channel!) *//* AudioClose() *//* Close audio file.*/void AudioClose ( AudioFile *file); /* in: audio file (handle) */#ifdef __cplusplus}#endif#endif /* #ifndef _audio_h_ *//* end of audio.h */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -