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 
00026 #if !defined(_SPANDSP_PRIVATE_TIME_SCALE_H_)
00027 #define _SPANDSP_PRIVATE_TIME_SCALE_H_
00028 
00029 #define TIME_SCALE_MAX_SAMPLE_RATE  48000
00030 #define TIME_SCALE_MIN_PITCH        60
00031 #define TIME_SCALE_MAX_PITCH        250
00032 #define TIME_SCALE_BUF_LEN          (2*TIME_SCALE_MAX_SAMPLE_RATE/TIME_SCALE_MIN_PITCH)
00033 
00034 /*! Audio time scaling descriptor. */
00035 struct time_scale_state_s
00036 {
00037     int sample_rate;
00038     int min_pitch;
00039     int max_pitch;
00040     int buf_len;
00041     float playout_rate;
00042     double rcomp;
00043     double rate_nudge;
00044     int fill;
00045     int lcp;
00046     int16_t buf[TIME_SCALE_BUF_LEN];
00047 };
00048 
00049 #endif
00050 /*- End of file ------------------------------------------------------------*/

Generated on 29 Jul 2015 for spandsp by  doxygen 1.6.1