• Main Page
  • Related Pages
  • Data Structures
  • Files
  • File List
  • Globals

include/yin.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
00002 /*
00003  * Copyright (c) 2008 Beyond Access, Inc.  All rights reserved.
00004  * 
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 
00009  * 1. Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer. 
00011  * 
00012  * 2. Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in
00014  *    the documentation and/or other materials provided with the
00015  *    distribution.
00016  * 
00017  * THIS SOFTWARE IS PROVIDED BY BEYOND ACCESS, INC. ``AS IS'' AND ANY
00018  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00020  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL BEYOND ACCESS, INC.  NOR
00021  * ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00022  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00023  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00024  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00025  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00026  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00027  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00028  */
00029 
00042 #ifndef __YIN_H__
00043 #define __YIN_H__
00044 
00045 #ifdef __cplusplus
00046 extern "C"
00047 #endif
00048 #if 0
00049 } /* Fool Emacs. */
00050 #endif
00051 
00052 /* Win32/WinCE DLL gunk */
00053 #include <sphinxbase_export.h>
00054 
00055 #include <sphinx_config.h>
00056 
00057 #include <prim_type.h>
00058 
00062 typedef struct yin_s yin_t;
00063 
00067 SPHINXBASE_EXPORT
00068 yin_t *yin_init(int frame_size, float search_threshold,
00069                 float search_range, int smooth_window);
00070 
00074 SPHINXBASE_EXPORT
00075 void yin_free(yin_t *pe);
00076 
00080 SPHINXBASE_EXPORT
00081 void yin_start(yin_t *pe);
00082 
00086 SPHINXBASE_EXPORT
00087 void yin_end(yin_t *pe);
00088 
00096 SPHINXBASE_EXPORT
00097 void yin_write(yin_t *pe, int16 const *frame);
00098 
00112 SPHINXBASE_EXPORT
00113 int yin_read(yin_t *pe, uint16 *out_period, uint16 *out_bestdiff);
00114 
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118 
00119 #endif /* __YIN_H__ */
00120 

Generated on Mon Aug 29 2011 for SphinxBase by  doxygen 1.7.1