private/time_scale.h

00001 /*
00002  * SpanDSP - a series of DSP components for telephony
00003  *
00004  * private/time_scale.h - Time scaling for linear speech data
00005  *
00006  * Written by Steve Underwood <steveu@coppice.org>
00007  *
00008  * Copyright (C) 2004 Steve Underwood
00009  *
00010  * All rights reserved.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 2.1,
00014  * as published by the Free Software Foundation.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024  *
00025  * $Id: time_scale.h,v 1.1 2008/11/15 14:27:29 steveu Exp $
00026  */
00027 
00028 #if !defined(_SPANDSP_PRIVATE_TIME_SCALE_H_)
00029 #define _SPANDSP_PRIVATE_TIME_SCALE_H_
00030 
00031 #define TIME_SCALE_MAX_SAMPLE_RATE  48000
00032 #define TIME_SCALE_MIN_PITCH        60
00033 #define TIME_SCALE_MAX_PITCH        250
00034 #define TIME_SCALE_BUF_LEN          (2*TIME_SCALE_MAX_SAMPLE_RATE/TIME_SCALE_MIN_PITCH)
00035 
00036 /*! Audio time scaling descriptor. */
00037 struct time_scale_state_s
00038 {
00039     int sample_rate;
00040     int min_pitch;
00041     int max_pitch;
00042     int buf_len;
00043     float playout_rate;
00044     double rcomp;
00045     double rate_nudge;
00046     int fill;
00047     int lcp;
00048     int16_t buf[TIME_SCALE_BUF_LEN];
00049 };
00050 
00051 #endif
00052 /*- End of file ------------------------------------------------------------*/

Generated on Tue Aug 4 03:36:11 2009 for spandsp by  doxygen 1.5.9