Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/src/spandsp/private/time_scale.h @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
| author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
|---|---|
| date | Fri, 25 Jun 2010 15:50:58 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
|---|---|
| 1 /* | |
| 2 * SpanDSP - a series of DSP components for telephony | |
| 3 * | |
| 4 * private/time_scale.h - Time scaling for linear speech data | |
| 5 * | |
| 6 * Written by Steve Underwood <steveu@coppice.org> | |
| 7 * | |
| 8 * Copyright (C) 2004 Steve Underwood | |
| 9 * | |
| 10 * All rights reserved. | |
| 11 * | |
| 12 * This program is free software; you can redistribute it and/or modify | |
| 13 * it under the terms of the GNU Lesser General Public License version 2.1, | |
| 14 * as published by the Free Software Foundation. | |
| 15 * | |
| 16 * This program is distributed in the hope that it will be useful, | |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 * GNU Lesser General Public License for more details. | |
| 20 * | |
| 21 * You should have received a copy of the GNU Lesser General Public | |
| 22 * License along with this program; if not, write to the Free Software | |
| 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
| 24 * | |
| 25 * $Id: time_scale.h,v 1.1 2008/11/15 14:27:29 steveu Exp $ | |
| 26 */ | |
| 27 | |
| 28 #if !defined(_SPANDSP_PRIVATE_TIME_SCALE_H_) | |
| 29 #define _SPANDSP_PRIVATE_TIME_SCALE_H_ | |
| 30 | |
| 31 #define TIME_SCALE_MAX_SAMPLE_RATE 48000 | |
| 32 #define TIME_SCALE_MIN_PITCH 60 | |
| 33 #define TIME_SCALE_MAX_PITCH 250 | |
| 34 #define TIME_SCALE_BUF_LEN (2*TIME_SCALE_MAX_SAMPLE_RATE/TIME_SCALE_MIN_PITCH) | |
| 35 | |
| 36 /*! Audio time scaling descriptor. */ | |
| 37 struct time_scale_state_s | |
| 38 { | |
| 39 int sample_rate; | |
| 40 int min_pitch; | |
| 41 int max_pitch; | |
| 42 int buf_len; | |
| 43 float playout_rate; | |
| 44 double rcomp; | |
| 45 double rate_nudge; | |
| 46 int fill; | |
| 47 int lcp; | |
| 48 int16_t buf[TIME_SCALE_BUF_LEN]; | |
| 49 }; | |
| 50 | |
| 51 #endif | |
| 52 /*- End of file ------------------------------------------------------------*/ |
