aflibAudioConstantSrc.h

00001 /*
00002  * Copyright: (C) 1999-2001 Bruce W. Forsberg
00003  *
00004  *   This library is free software; you can redistribute it and/or
00005  *   modify it under the terms of the GNU Lesser General Public
00006  *   License as published by the Free Software Foundation; either
00007  *   version 2.1 of the License, or any later version.
00008  *
00009  *   This library is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *   Lesser General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU Lesser General Public
00015  *   License along with this library; if not, write to the Free Software
00016  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00017  *
00018  *   Bruce Forsberg  forsberg@tns.net
00019  *
00020  */
00021 
00022 
00023 #ifndef _AFLIBAUDIOCONSTANTSRC_H_
00024 #define _AFLIBAUDIOCONSTANTSRC_H_
00025 
00026 #ifdef HAVE_CONFIG_H
00027 #include <config.h>
00028 #endif
00029 
00030 #include "aflibAudio.h"
00031 
00032 
00048 class aflibAudioConstantSrc: public aflibAudio {
00049 
00050 public:
00051 
00052 enum waveform_type
00053 {
00054    WAVEFORM_DCLEVEL,
00055    WAVEFORM_TRIANGLE,
00056    WAVEFORM_SQUAREWAVE,
00057    WAVEFORM_SINEWAVE
00058 };
00059 
00060    // Available contructors and destructors
00061    aflibAudioConstantSrc(aflibAudio& audio);
00062    aflibAudioConstantSrc();
00063 
00064    ~aflibAudioConstantSrc();
00065 
00066    void
00067    setWaveformType(
00068       aflibAudioConstantSrc::waveform_type wave,
00069       double  max_amp,
00070       double  min_amp,
00071       int  frequency);
00072 
00073    aflibStatus
00074    compute_segment(
00075       list<aflibData *>& data,
00076       long long position = -1) ;
00077 
00079    const char *
00080    getName() const { return "aflibAudioConstantSrc";};
00081 
00082 private:
00083 
00084 
00085    aflibAudioConstantSrc(const aflibAudioConstantSrc& op);
00086 
00087    const aflibAudioConstantSrc&
00088    operator=(const aflibAudioConstantSrc& op);
00089 
00090 waveform_type  _wave;
00091 double         _amp_max;
00092 double         _amp_min;
00093 int            _freq;
00094 
00095 };
00096 
00097 
00098 #endif

Generated on Tue Jan 16 12:42:55 2007 for Open Source Audio Library Project by  doxygen 1.4.6