14a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project/*---------------------------------------------------------------------------*
24a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  frontapi.h                                                               *
34a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *                                                                           *
44a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  Copyright 2007, 2008 Nuance Communciations, Inc.                         *
54a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *                                                                           *
64a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  Licensed under the Apache License, Version 2.0 (the 'License');          *
74a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  you may not use this file except in compliance with the License.         *
84a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *                                                                           *
94a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  You may obtain a copy of the License at                                  *
104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *      http://www.apache.org/licenses/LICENSE-2.0                           *
114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *                                                                           *
124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  Unless required by applicable law or agreed to in writing, software      *
134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  distributed under the License is distributed on an 'AS IS' BASIS,        *
144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  See the License for the specific language governing permissions and      *
164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *  limitations under the License.                                           *
174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *                                                                           *
184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project *---------------------------------------------------------------------------*/
194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#ifndef _h_frontapi_
234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#define _h_frontapi_
244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#include "creccons.h"   /* CREC Public Constants    */
264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#include "front.h"
284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#include "sample.h"
294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#include "utteranc.h"
304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#include "caexcept.h"
314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#ifdef __cplusplus
334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Projectextern "C"
344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project{
354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#endif
364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * SwigImageBegin       <- DO NOT MOVE THIS LINE !
404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This is a CADOC Keyword section.
424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * If CADOC is instructed to create a SWIG I-File and this is one of the
444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * files in the input list, everything between the 'SwigImage Begin' and
454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * 'SwigImage End' keywords comment blocks will be copied 'as-is' to the
464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * SWIG I-File specified on the CADOC command line.
474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#include "mutualob.h"
514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#ifndef SWIGBUILD
534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  typedef struct
554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  {
564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    int                 ca_rtti;
574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    booldata            is_configured;
584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    booldata            is_configuredForAgc;
594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    booldata            is_configuredForVoicing;
604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    booldata            is_attached;
614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    wave_info           data;
624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    voicing_info        voice;
634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  }
644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  CA_Wave;
654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  typedef struct
674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  {
684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    int                 ca_rtti;
694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    booldata            is_configured;
704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    booldata            is_filter_loaded;
714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    int                 status;
724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    int                 samplerate;
734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    float               src_scale;
744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    float               sink_scale;
754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    int                 offset;
764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project    front_config        *config;
774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  }
784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  CA_Frontend;
794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#endif
814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * SwigImageEnd         <- DO NOT MOVE THIS LINE !
854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /*
894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  **  Frontend
904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  */
914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  CA_Frontend* CA_AllocateFrontend(float srcscale,
934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                   int offset,
944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                   float sinkscale);
954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       srcscale    Gain applied to incoming wave data
984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              offset      DC offset applied to incoming wave data
994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              sinkscale   Gain applied to any wave data sinks
1004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Handle to new Front End object
1024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_FreeFrontend
1044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Allocates a front-end object
1074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
1094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_FreeFrontend(CA_Frontend* hFrontend);
1124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
1134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   Handle to valid front-end object
1154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
1174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_AllocateFrontend
1194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Deletes a front-end object
1224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
1244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ConfigureFrontend(CA_Frontend *hFrontend,
1274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                            CA_FrontendInputParams *hFrontArgs);
1284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
1294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   Handle to valid front-end object
1314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hFrontpars  Handle to valid front-end input parameters object
1324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
1344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_UnconfigureFrontend
1364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Set up the front end using the paramteters. This function
1394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * configures the member Wave, Freq and Cep objects, by calling their
1404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * create and setup functions.
1414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
1434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_SetWarpScale(CA_Frontend *hFrontend, float wscale);
1464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
1474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   Handle to valid front-end object
1494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              wscale      warp scale
1504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
1524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_SetFrontendParameter
1544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
1584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_UnconfigureFrontend(CA_Frontend *hFrontend);
1604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
1614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   Handle to valid front-end object
1634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
1654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_ConfigureFrontend
1674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Undo all of the front end configurations
1704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
1724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_MakeFrame(CA_Frontend* hFrontend,
1754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                    CA_Utterance* hUtt,
1764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                    CA_Wave* hWave);
1774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
1784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   Handle to valid front-end object
1804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hUtt        Handle to valid utterance object
1814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hWave       Handle to valid wave object
1824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      non-zero if a frame was constructed
1844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Constructs a single frame from audio in the wave object.  The output
1874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * frame is inserted into the utterance.
1884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
1894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Frames may not be built. An initial start-up condition prevents
1904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * the first few frames of audio from being used for frames, in this case
1914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * this method returns zero to the caller.
1924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
1934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
1944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
1964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetFrontendFramesPerValidFrame(CA_Frontend *hFrontend);
1974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetFrontendSampleRate(CA_Frontend *hFrontend);
1984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
1994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   Handle to valid front-end object
2014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns       Current sample rate (Hz)
2034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_ConfigureFrontend
2054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Gets the sample rate from the front end object
2084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
2104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetFrontendUtteranceDimension(CA_Frontend *hFrontend);
2134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
2144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   Handle to valid front-end object
2164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      The dimension of utterance that the front end will build
2184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_InitUtteranceForFile
2204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_InitUtteranceForFrontend
2214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_LoadUtteranceFrame
2224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns the number of items in an utterance.
2254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
2274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetRecognitionHoldoff(CA_FrontendInputParams *hFrontPar);
2304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
2314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontpar  Handle to valid front-end input parameters object
2334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      The minimum recognition holdoff period, i.e. the minimum
2354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              gap between the frontend and recognizer.
2364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Computes the Recognition Holdoff Parameter value.  Setting the par in
2394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * a par file is unnecessary if this function is used.
2404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
2424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /*
2454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  **  Channel normalization
2464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  */
2474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source ProjectESR_ReturnCode CA_GetCMSParameters ( CA_Wave *hWave, LCHAR *param_string, size_t* len );
2484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source ProjectESR_ReturnCode CA_SetCMSParameters ( CA_Wave *hWave, const LCHAR *param_string );
2494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ReLoadCMSParameters(CA_Wave *hWave,
2524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                              const char *basename);
2534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_LoadCMSParameters(CA_Wave *hWave,
2554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                            const char *basename,
2564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                            CA_FrontendInputParams
2574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                            *hFrontArgs);
2584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
2594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid wave object
2614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              basename    Forename of .cmn and .tmn files that store the parameters
2624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hFrontPar       Handle to a valid CRhFrontendInputParams
2634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing
2654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_ConfigureCMSparameters
2674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_SaveCMSParameters
2684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_AttachCMStoUtterance
2694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Loads CMS parameters from file.  Sets up the CMS calculations
2724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The .cmn and .tmn files must obviously have the same basename.
2734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
2754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
2774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_SaveCMSParameters(CA_Wave *hWave,
2784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                            const char *basename);
2794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
2804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid wave object
2824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              basename    Forename of .cmn and .tmn files that are
2834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *                          to store the parameters
2844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing
2864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadCMSParameters
2884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ClearCMSParameters
2894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This method writes out .CMN and .TMN files.
2924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The .CMN file may differ from the one used during a call to
2944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * CA_LoadCMSParameters() due to channel adaptation.
2954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
2964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The .cmn and .tmn files will obviously have the same basename.
2974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
2984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
2994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ClearCMSParameters(CA_Wave *hWave);
3024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
3034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid wave object
3054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing
3074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadCMSParameters
3094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_SaveCMSParameters
3104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_DetachCMSfromUtterance
3114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This method clears any CMS information.  Must call
3144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * CA_DetachCMSfromUtterance on the Wave first, if CA_AttachCMStoUtterance
3154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * has been called.
3164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
3184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_AttachCMStoUtterance(CA_Wave *hWave,
3204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                               CA_Utterance *hUtt);
3214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
3224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
3244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hUtt    Handle to an utterance object to clear
3254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing.
3274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadCMSParameters
3294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_DetachCMStoUtterance
3304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  The CMS data items are inherited from the CA_Wave object to the
3334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  CA_Utterance.  All calculations carried out with this utterance
3344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  object will now result in new statistics being inherited by the
3354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  CA_Wave object.
3364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
3384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
3404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns true if CMS is attached to utterance.
3414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * @param hWave wave handle
3434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * @param isAttached [out] True if attached
3444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
3454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  ESR_ReturnCode CA_IsCMSAttachedtoUtterance(CA_Wave* hWave, ESR_BOOL* isAttached);
3464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
3484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns true if CA_Wave is configured for Agc.
3494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * @param hWave wave handle
3514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * @param isAttached [out] True if attached
3524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
3534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  ESR_ReturnCode CA_IsConfiguredForAgc(CA_Wave* hWave, ESR_BOOL* isConfigured);
3544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_DetachCMSfromUtterance(CA_Wave *hWave,
3564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                 CA_Utterance *hUtt);
3574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
3584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
3604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hUtt    Handle to an utterance object to clear
3614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing.
3634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadCMSParameters
3654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_AttachCMStoUtterance
3664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ClearCMSParameters
3674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  The CMS data items are now dis-inherited by the CA_Utterance object.
3704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  Calculations carried out with this utterance
3714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  object will no longer result in new statistics being inherited by the
3724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  CA_Wave object.
3734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
3754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_CalculateCMSParameters(CA_Wave *hWave);
3784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
3794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid wave object
3814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns
3834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadCMSParameters
3854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_AttachCMStoUtterance
3864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_DiscardCMSAccumulates
3874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
3884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This routine updates the values used for cepstrum mean subtraction
3904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * using a running estimation algorithm.
3914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * A call must first have been made to CA_LoadCMSparameters and
3924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * subsequently to a CA_AttachCMStoUtterance.
3934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
3944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
3954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
3974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_DiscardCMSAccumulates(CA_Wave *hWave);
3984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
3994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid wave object
4014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns
4034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadCMSParameters
4054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_AttachCMStoUtterance
4064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_CalculateCMSParameters
4074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This routine clears the updates used for the running estimation of
4104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * cepstrum mean subtraction.
4114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * CMS parameters must have been loaded and attached to the wave.
4124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
4144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /*
4184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  **  Wave
4194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  */
4204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
4214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * CA_Wave methods
4234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The wave-input object that represents a file or a device.
4254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It maintains sample buffers and data associated with that input stream
4264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * such as agc, talk-over etc.
4274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * However the process of getting samples into the CA_Wave object from
4294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * a physical device is external to CREC-API.
4304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
4324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  CA_Wave* CA_AllocateWave(char typ);
4344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
4354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       typ     A waveform type charcater
4374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Handle to a new Wave structure
4394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_FreeWave
4414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ConfigureWave
4424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Creates a Wave structure.
4454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * There are several options for the 'typ' character, each is listed below:
4474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'M' mu-Law
4484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'P' PCM  (i.e. 8k or 11kHz PCM Files)
4494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'R' RIFF
4504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'N' NIST
4514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Once allocated, the returned object should be configured with a call
4534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * to CA_ConfigureWave().
4544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
4564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ConfigureWave(CA_Wave *hWave,
4594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                        CA_Frontend *hFrontend);
4604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
4614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to a previously created Wave structure
4634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hFrontend   Handle to valid front-end object
4644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
4664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_UnconfigureWave
4684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Initializes a Wave structure.
4714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This should be called before any other Wave methods.
4734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
4754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ConfigureVoicingAnalysis(CA_Wave *hWave,
4784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                   CA_FrontendInputParams *hFrontPar);
4794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
4804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave           Handle to a previously created Wave structure
4824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hFrontPar       Handle to a valid CRhFrontendInputParams
4834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
4854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Initializes a Wave's voicin analysis module.
4884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
4894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
4904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
4924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ResetWave(CA_Wave *hWave);
4934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
4944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to a previously created Wave structure
4964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing
4984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
4994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This prepares the wave object for re-use.  The voicing information
5014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * is cleared. It is *essential* to call this function if the Wave object
5024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * is used for streaming live data, or multiple-utterance wave files.
5034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
5064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_UnconfigureWave(CA_Wave *hWave);
5094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
5104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to a previously created Wave structure
5124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
5144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_ConfigureWave
5164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Uninitializes a Wave structure.
5194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
5214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_FreeWave(CA_Wave *hWave);
5244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
5254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to a previously created Wave structure
5274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing, the Wave object is no longer valid
5294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_AllocateWave
5314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Removes a previously allocated Wave structure
5344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
5364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_OpenWaveFromFile(CA_Wave *hWave,
5394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                           char* filename,
5404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                           char typ,
5414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                           int endian,
5424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                           int do_write,
5434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                           int samplerate);
5444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
5454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid Wave structure
5474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              filename    ASCII, null-terminated filename string
5484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              typ         File attribute character
5494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              endian      Binary storage, use 'LITTLE' or 'BIG'
5504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              do_write    Adds a RIFF header if non-ZERO
5514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              samplerate  File's sample rate (Hz)
5524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      non-ZERO if successful
5544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_CloseFile
5564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Initializes the Wave structure for use with a known filename.
5594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * There are several options for the 'typ' character, each is listed below:
5614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'M' mu-Law Files
5624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'P' PCM Files (i.e. 8k or 11kHz PCM Files)
5634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'R' RIFF
5644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  'N' NIST
5654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
5674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
5694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_CloseFile(CA_Wave *hWave);
5724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
5734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
5754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing, the opened file is closed
5774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_OpenWaveFromFile
5794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
5824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
5834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
5844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
5864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_OpenWaveFromDevice(CA_Wave *hWave,
5874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                             int wave_type,
5884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                             int samplerate,
5894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                             int device_id,
5904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                             int device_type);
5914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
5924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
5934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid Wave structure
5944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              wave_type   Audio format
5954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              samplerate  Device sample rate (Hz)
5964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              device_id   The Physical device number of the
5974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *                          waveform hardware (normally starting at 0)
5984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              device_type The type of device
5994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      non-ZERO if successful
6014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_CloseDevice
6034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Initializes the Wave structure for use with a known filename.
6064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * 'wave_type' should be either DEVICE_MULAW or DEVICE_RAW_PCM.  This
6084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * enables correct internal interpretation of the audio samples.  If the
6094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * device is an output device 'wave_type' should be 0 (ZERO).
6104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
6124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * 'device_type' should be one of WAVE_DEVICE_MSWAVE (for real devices)
6144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * or WAVE_DEVICE_RAW (if using the raw interface - CA_LoadSamples)
6154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
6174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_CloseDevice(CA_Wave *hWave);
6204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
6214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
6234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing, the opened device is closed
6254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_OpenWaveFromDevice
6274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
6304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
6324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_SetWaveBoostValue(CA_Wave *hWave,
6354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                            int waveBoost);
6364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
6374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid Wave structure
6394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              waveBoost   The input sample scaling value (in %)
6404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
6424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The 'offset' and 'gain' parameters are applied to the current
6454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * waveform buffer and the resultant samples clamped to a 16-bit
6464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * audio range.
6474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
6494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
6514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetWaveBoostValue(CA_Wave *hWave);
6544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
6554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
6574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      The input sample scaling value (in %)
6594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
6624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
6644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetSampleRate(CA_Wave *hWave);
6674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
6684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid Wave structure
6704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Sample rate used by the wave device
6724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadSamples
6744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ConfigureWave
6754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
6784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
6804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
6824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_CopyWaveSegment(CA_Wave *source,
6834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                          CA_Wave *sink,
6844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                          unsigned long offset,
6854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                          unsigned long length);
6864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
6874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       source  Handle to valid Wave structure for source
6894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              sink    Handle to valid Wave structure for destination
6904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              offset  Sample number starting the segment (first sample == 0)
6914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              length  Number of samples in the segment
6924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing, the wave segment in 'source' is copied to 'sink'
6944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
6964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This is useful when copying selected sections of a waveform.  It is
6974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * employed within the SDXCollect_SinkWaveSegment() method.
6984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
6994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * 'source' and 'sinks' must be different objects.
7004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring
7024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * the 'source' and 'sink' wave objects.
7034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
7054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetBufferSize(CA_Wave *hWave);
7084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
7094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid Wave structure
7114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Buffer size (in bytes) used by the wave device for
7134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              the construction of a single frame.
7144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadSamples
7164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ConfigureWave
7174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This function is supplied for use in conjunction with CA_LoadSamples.
7204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The application should call CA_CetBufferSIze on the current input Wave
7214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * object and use the result to create the wave sample buffer that it will
7224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * supply to CA_LoadSamples.
7234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
7254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
7274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#ifndef SWIGBUILD
7304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_LoadSamples(CA_Wave *hWave,
7314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                      samdata *pPCMData,
7324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                      int sampleCount);
7334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#else
7344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_LoadSamples(CA_Wave *hWave,
7354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                      short *pPCMData,
7364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                      int sampleCount);
7374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#endif
7384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
7394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave       Handle to valid Wave structure
7414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              pPCMData    Pointer to a buffer created by the application.
7424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              sampleCount The number of samples in the supplied buffer.
7434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Buffer size (in bytes) used by the wave device for
7454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              the construction of a single frame.
7464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_GetBufferSize
7484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ConfigureWave
7494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The buffer contains exactly enough wave data to make one frame of an
7524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * utterance. The required buffer size can be got by calling CA_GetBufferSize.
7534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The application is responsible for ensuring that the supplied sample
7544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * data is in the correct format. The sample rate should match that of the
7554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * recognizer, and the sample size should be of size 16 bits. CA_LoadSamples
7564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * will check the sample count, and report an error if it does not match
7574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * the front end's required buffer size.
7584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
7604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
7624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_ReadSamplesForFrame(CA_Wave *hWave);
7654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
7664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
7684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      The number of samples read; <0 on failure.
7704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_SaveSamplesForFrame
7724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
7754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
7774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_SaveSamplesForFrame(CA_Wave *hWave);
7804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
7814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
7834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      The number of samples read; <0 on failure.
7854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_ReadSamplesForFrame
7874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
7904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
7914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
7924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
7944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ConditionSamples(CA_Wave *hWave);
7954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
7964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
7984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
7994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Nothing. The incoming audio buffer is 'conditioned'.
8004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The 'offset' and 'gain' parameters are applied to the current
8034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * waveform buffer and the resultant samples clamped to a 16-bit
8044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * audio range.
8054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
8074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
8094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_CopyWaveSamples(CA_Wave *hWaveIn,
8124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                          CA_Wave *hWaveOut);
8134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
8144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWaveIn     Handle to valid Wave object
8164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hWaveOut    Handle to valid Wave object
8174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      The audio samples in the In channel are
8194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              copied to the Out channel
8204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This method is provided to permit incoming audio sample to be copied
8234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * to the sink for file storage.  The wave objects should have been
8244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * created as appropriate sources or sinks.
8254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * 'hWaveIn' and 'hWaveOut' must be different objects.
8274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring
8294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * the 'hWaveIn' and 'hWaveOut' wave objects.
8304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
8324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_WaveIsOutput(CA_Wave *hWave);
8354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
8364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
8384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Boolean.
8404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns true if the Wave is setup as a sink of data
8434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
8454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * and setting it up as a device or a file
8464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
8484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_WaveIsInput(CA_Wave *hWave);
8514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
8524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
8544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Boolean.
8564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns true if the Wave is setup as a source of data
8594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
8614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * and setting it up as a device or a file
8624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
8644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_WaveIsADevice(CA_Wave *hWave);
8674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
8684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
8704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Boolean.
8724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns true if the Wave is setup as a device
8754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
8774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * and setting it up as a device or a file
8784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
8804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_WaveIsAFile(CA_Wave *hWave);
8834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
8844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hWave   Handle to valid Wave structure
8864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Boolean.
8884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns true if the Wave is setup as a file of data
8914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
8924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first configuring hWave
8934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * and setting it up as a device or a file
8944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
8954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
8964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
8974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_StartSigCheck(CA_Wave *hWave);
8984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_StopSigCheck(CA_Wave *hWave);
8994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ResetSigCheck(CA_Wave *hWave);
9004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_GetSigStats(CA_Wave *hWave, int *nsam, int *pclowclip, int *pchighclip,
9014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                      int *dc_offset, int *amp, int *pc5, int *pc95,
9024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                      int *overflow);
9034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  ESR_BOOL CA_DoSignalCheck(CA_Wave *hWave, ESR_BOOL *clipping, ESR_BOOL *dcoffset,
9044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                        ESR_BOOL *highnoise, ESR_BOOL *quietspeech, ESR_BOOL *too_few_samples,
9054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                        ESR_BOOL *too_many_samples);
9064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /*  Frontend parameter API
9104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  */
9114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
9124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * CA_FrontendInputParams methods
9144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * To load the front-end parameters from a par file
9164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * This object holds input parameters (objtained from an ASCII
9184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * parameter file) for the Front-End object.
9194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Apart from allocating and freeing the object it also has a method
9214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * used to read a given parameter file.
9224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
9244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  CA_FrontendInputParams* CA_AllocateFrontendParameters(void);
9284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
9294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       void
9314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Handle to new front-end input object
9334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_FreeFrontendParameters
9354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ConfigureFrontend
9364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Creates a new front-end input paramater onject
9394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
9414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_LoadFrontendParameters(CA_FrontendInputParams* hFrontpar,
9444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                 const char* parfile);
9454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
9464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontpar   valid front-end input object handle
9484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              parfile     par file
9494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
9514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_SaveFrontendParameters
9534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ConfigureFrontend
9544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Loads known front-end parameters from the given .PAR file.
9574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * The file is a .par file
9584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
9604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_FreeFrontendParameters(CA_FrontendInputParams* hFrontpar);
9634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
9644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontpar   valid front-end input object handle
9664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void        front-end object is no longer valid
9684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_AllocateFrontendParameters
9704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Removes a previously allocated parameter object
9734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
9754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_SaveFrontendParameters(CA_FrontendInputParams* hFrontpar,
9784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                 const char* parfile);
9794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
9804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontpar   valid front-end input object handle
9824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              parfile     parameter (.par) file to read
9834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
9854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadFrontendParameters
9874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_ConfigureFrontend
9884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Saves a previously loaded (modified) parameter file
9914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
9924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first loading
9934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * front-end input parameters.
9944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
9954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
9964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
9984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_SetFrontendParameter(CA_FrontendInputParams *hFrontpar,
9994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                               char *key,
10004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                               char *value);
10014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
10024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontpar   valid Front End Parameter handle
10044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              key         parameter key (text label)
10054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              value       new parameter value (text)
10064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      Zero on error
10084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_GetFrontendStringParameter
10104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_GetFrontendIntParameter
10114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_GetFrontendFloatParameter
10124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_LoadFrontendParameters
10134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Sets/Modifies a known Front End Input parameter.
10164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first loading
10184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * front-end input parameters.
10194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
10214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
10224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
10234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetFrontendParameter(CA_FrontendInputParams *hFrontpar,
10244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                               char *key,
10254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                               void *value);
10264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
10274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontpar   valid Front End Parameter handle
10294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              key         parameter key (text label)
10304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              value       pointer to store parameter value (text)
10314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              valueLen    size of value buffer
10324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      False on error
10344a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10354a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_SetFrontendParameter
10364a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_LoadFrontendParameters
10374a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10384a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10394a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Reads a known Front End Parameter.
10404a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10414a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first loading
10424a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * front-end input parameters.
10434a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10444a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
10454a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
10464a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int  CA_GetFrontendStringParameter(CA_FrontendInputParams *hFrontpar,
10474a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                     char *key,
10484a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                     char *value,
10494a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                     int valueLen,
10504a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project                                     int *bytes_required);
10514a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
10524a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10534a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontpar   valid Front End Parameter handle
10544a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              key         parameter key (text label)
10554a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              value       pointer to store parameter value
10564a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  value_len   number of bytes pointed to by value
10574a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *  bytes_required holds the number of bytes neededf to store the data
10584a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10594a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      False on error
10604a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10614a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_SetFrontendParameter
10624a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_LoadFrontendParameters
10634a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10644a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10654a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Reads a known Front End Parameter.
10664a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10674a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first loading
10684a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * front-end input parameters.
10694a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10704a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
10714a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
10724a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int CA_LoadSpectrumFilter(CA_Frontend *hFrontend, char *basename);
10734a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
10744a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10754a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   valid Frontend handle
10764a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              basename    basename of filter file (a text file)
10774a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              hFrontArs   valid Frontend parameters handle
10784a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10794a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      False on error
10804a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10814a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_SetFrontendParameter
10824a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *              CA_LoadFrontendParameters
10834a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10844a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10854a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Loads a spectrum filter from a file.
10864a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10874a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first loading
10884a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * front-end input parameters.
10894a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
10904a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
10914a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
10924a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_ClearSpectrumFilter(CA_Frontend *hFrontend);
10934a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
10944a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10954a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   valid Frontend handle
10964a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10974a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      void
10984a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
10994a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadSpectrumFilter
11004a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
11014a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
11024a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Clears a front end spectrum filter.
11034a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
11044a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * It is an error to call this function without first loading
11054a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * front-end input parameters.
11064a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
11074a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
11084a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
11094a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  int CA_IsSpectrumFilterLoaded(CA_Frontend *hFrontend);
11104a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  /**
11114a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
11124a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Params       hFrontend   valid Frontend handle
11134a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
11144a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * Returns      True if front end is loaded with a spectrum filter.
11154a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
11164a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   * See          CA_LoadSpectrumFilter
11174a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
11184a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
11194a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   *
11204a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   ************************************************************************
11214a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project   */
11224a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
11234a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_EnableNonlinearFilter(CA_Frontend *hFrontend);
11244a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_DisableNonlinearFilter(CA_Frontend *hFrontend);
11254a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_EnableSpectrumFilter(CA_Frontend *hFrontend);
11264a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project  void CA_DisableSpectrumFilter(CA_Frontend *hFrontend);
11274a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
11284a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#ifdef __cplusplus
11294a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project}
11304a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#endif
11314a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
11324a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project
11334a68b3365c8c50aa93505e99ead2565ab73dcdb0The Android Open Source Project#endif
1134