00001 /* 00002 * steghide 0.5.1 - a steganography program 00003 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at> 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, Boston, MA 02111-1307, USA. 00018 * 00019 */ 00020 00021 #ifndef SH_WAVSAMPLE_H 00022 #define SH_WAVSAMPLE_H 00023 00024 #include <functional> 00025 00026 #include "SampleValue.h" 00027 00028 class CvrStgFile ; 00029 00030 class WavPCMSampleValue : public SampleValue { 00031 public: 00032 WavPCMSampleValue (int v) ; 00033 00034 SampleValue* getNearestTargetSampleValue (EmbValue t) const ; 00035 UWORD32 calcDistance (const SampleValue *s) const ; 00036 std::string getName (void) const ; 00037 00038 int getValue (void) const 00039 { return Value ; } ; 00040 00041 private: 00042 int Value ; 00043 int MaxValue ; 00044 int MinValue ; 00045 00046 EmbValue calcEValue (int v) const 00047 { return (v & 1) ; } 00048 } ; 00049 00050 class WavPCMSmaller : public std::binary_function<WavPCMSampleValue*,WavPCMSampleValue*,bool> { 00051 public: 00052 bool operator() (const WavPCMSampleValue *v, const WavPCMSampleValue *w) { return v->getValue() < w->getValue() ; } ; 00053 } ; 00054 00055 #endif // ndef SH_WAVSAMPLE_H