00001 // 00002 // Copyright(c) 1993-1996 Tony Kirke 00003 // author="Tony Kirke" * 00004 /* 00005 * SPUC - Signal processing using C++ - A DSP library 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2, or (at your option) 00010 * any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 */ 00021 namespace SPUC { 00028 00029 00030 00031 00032 00033 00034 00035 class sigma_delta 00036 { 00037 protected: 00038 signed long in; 00039 signed long acc; 00040 unsigned long mask; 00041 public: 00042 unsigned char nbit_out; 00043 unsigned char nbit_in; 00044 00046 sigma_delta(char nin=8, char nout=1); 00048 signed char single(signed long in); 00049 } ; 00050 } // namespace SPUC