Main Page | Class List | File List | Class Members | File Members

Audio.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 Audio.h - description 00003 ------------------- 00004 begin : mer nov 12 2003 00005 copyright : (C) 2003 by 00006 email : 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #if defined (AUDIO_H) 00018 00019 #else 00020 00021 #define AUDIO_H 00022 00023 #define CHANNELS_MONO 1 // mono 00024 #define CHANNELS_STEREO 2 // stereo 00025 #define SAMPLE_SIZE_8_BITS 8 // 8 bits per sample 00026 #define SAMPLE_SIZE_16_BITS 16 // 16 bits per sample 00027 #define SAMPLING_RATE_8KHz 8000 // 8KHz sampling rate, in Hz 00028 #define SAMPLING_RATE_44KHz 44100 // 44KHz sampling rate, in Hz 00029 #define SAMPLING_RATE_48KHz 48000 // 48KHz sampling rate, in Hz 00030 #define SAMPLING_RATE_96KHz 96000 // 96KHz sampling rate, in Hz 00031 00032 #define SAMPLING_RATE SAMPLING_RATE_48KHz 00033 #define STEP (SAMPLING_RATE / SAMPLING_RATE_8KHz) 00034 #define LENGTH (64 * STEP) 00035 00036 00037 00039 int OpenAudioDevice(const char *audioDevice); 00040 00042 00045 int SetAudioDevice(int samplingRate, int sampleSize); 00046 00048 /* \return Always returns +1 (success)*/ 00049 int CloseAudioDevice(); 00050 00052 00054 int ReadFromAudioDevice(unsigned char *); 00055 00057 00060 int PlayBuffer(unsigned char *,long); 00061 00063 00065 int SetMicLevel(int); 00066 00068 00069 char *Audio_GetLastError(); 00070 00071 #endif

Generated on Fri Jul 23 11:36:01 2004 for WhistleRecogniser by doxygen 1.3.7