00001 /* ola_frame.h $Revision: 1.1 $ $Date: 2005/12/18 20:31:34 $ 00002 Copyright (C) 2003 University of Bonn. 00003 http://www.ikp.uni-bonn.de/boss 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 */ 00020 00030 #ifndef OLA_FRAME_H 00031 #define OLA_FRAME_H 00032 00033 #include <vector> 00034 #include "sampled_signal.h" 00035 00036 using namespace std; 00037 00041 template <class T> 00042 class OLA_Frame: public SampledSignal<T> { 00043 long centerPitchmark; 00044 long lastPitchmark; 00045 double intensity; 00046 int repetitions; 00047 bool voiced; 00048 00049 public: 00050 OLA_Frame(long size): SampledSignal<T>(size) {} 00051 OLA_Frame(const SampledSignal<T> & signal, long start, long end); 00052 void setCenter(long center); 00053 long getCenter(); 00054 void setVoiced(bool voiced); 00055 bool getVoiced(); 00056 00057 00058 }; 00059 00060 00064 template<class T> 00065 OLA_Frame<T>::OLA_Frame(const SampledSignal<T> & signal, long start, long end) 00066 : SampledSignal<T>(signal, start, end) { 00067 } 00068 00072 template<class T> 00073 void OLA_Frame<T>::setVoiced(bool voiced) { 00074 this->voiced = voiced; 00075 } 00076 00080 template<class T> 00081 bool OLA_Frame<T>::getVoiced() { 00082 return this->voiced; 00083 } 00084 00085 00089 template<class T> 00090 void OLA_Frame<T>::setCenter(long center) { 00091 centerPitchmark = center; 00092 } 00093 00097 template<class T> 00098 long OLA_Frame<T>::getCenter() { 00099 return centerPitchmark; 00100 } 00101 // end of group boss_ola 00103 00104 #endif 00105