00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ 00002 /* ==================================================================== 00003 * Copyright (c) 1999-2001 Carnegie Mellon University. All rights 00004 * reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in 00015 * the documentation and/or other materials provided with the 00016 * distribution. 00017 * 00018 * This work was supported in part by funding from the Defense Advanced 00019 * Research Projects Agency and the National Science Foundation of the 00020 * United States of America, and the CMU Sphinx Speech Consortium. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 00023 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00024 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00025 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 00026 * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 * ==================================================================== 00035 * 00036 */ 00037 00038 /* 00039 * ad.c -- Wraps a "sphinx-II standard" audio interface around the basic audio 00040 * utilities. 00041 * 00042 * HISTORY 00043 * 00044 * 11-Jun-96 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University. 00045 * Modified to conform to new A/D API. 00046 * 00047 * 12-May-96 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University. 00048 * Dummy template created. 00049 */ 00050 00051 #include <stdio.h> 00052 #include <string.h> 00053 #include <config.h> 00054 00055 #include "prim_type.h" 00056 #include "ad.h" 00057 00058 #define QUIT(x) {fprintf x; exit(-1);} 00059 00060 00061 ad_rec_t * 00062 ad_open_dev(const char *dev, int32 samples_per_sec) 00063 { 00064 fprintf(stderr, "A/D library not implemented\n"); 00065 return NULL; 00066 } 00067 00068 00069 ad_rec_t * 00070 ad_open_sps(int32 samples_per_sec) 00071 { 00072 fprintf(stderr, "A/D library not implemented\n"); 00073 return NULL; 00074 } 00075 00076 ad_rec_t * 00077 ad_open(void) 00078 { 00079 return ad_open_sps(DEFAULT_SAMPLES_PER_SEC); 00080 } 00081 00082 00083 int32 00084 ad_start_rec(ad_rec_t * r) 00085 { 00086 return -1; 00087 } 00088 00089 00090 int32 00091 ad_stop_rec(ad_rec_t * r) 00092 { 00093 return -1; 00094 } 00095 00096 00097 int32 00098 ad_read(ad_rec_t * r, int16 * buf, int32 max) 00099 { 00100 return -1; 00101 } 00102 00103 00104 int32 00105 ad_close(ad_rec_t * r) 00106 { 00107 return 0; 00108 }