00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * swept_tone.h - Swept tone generation 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2009 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 General Public License version 2, as 00014 * 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 General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 * 00025 * $Id: swept_tone.h,v 1.1 2009/09/22 12:54:33 steveu Exp $ 00026 */ 00027 00028 /*! \file */ 00029 00030 #if !defined(_SPANDSP_SWEPT_TONE_H_) 00031 #define _SPANDSP_SWEPT_TONE_H_ 00032 00033 /*! \page swept_tone_page The swept tone generator 00034 \section swept_tone_page_sec_1 What does it do? 00035 */ 00036 00037 typedef struct swept_tone_state_s swept_tone_state_t; 00038 00039 #if defined(__cplusplus) 00040 extern "C" 00041 { 00042 #endif 00043 00044 SPAN_DECLARE(swept_tone_state_t *) swept_tone_init(swept_tone_state_t *s, float start, float end, float level, int duration, int repeating); 00045 00046 SPAN_DECLARE(int) swept_tone(swept_tone_state_t *s, int16_t amp[], int len); 00047 00048 SPAN_DECLARE(float) swept_tone_current_frequency(swept_tone_state_t *s); 00049 00050 SPAN_DECLARE(int) swept_tone_release(swept_tone_state_t *s); 00051 00052 SPAN_DECLARE(int) swept_tone_free(swept_tone_state_t *s); 00053 00054 #if defined(__cplusplus) 00055 } 00056 #endif 00057 00058 #endif 00059 /*- End of file ------------------------------------------------------------*/