summaryrefslogtreecommitdiffstats
path: root/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/SineGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/SineGenerator.h')
-rw-r--r--Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/SineGenerator.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/SineGenerator.h b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/SineGenerator.h
new file mode 100644
index 0000000..d946bfa
--- /dev/null
+++ b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/SineGenerator/src/SineGenerator.h
@@ -0,0 +1,38 @@
+/*
+ * SineGenerator.h
+ *
+ * Created on: 31.03.2011
+ * Author: sven
+ */
+
+#ifndef SINEGENERATOR_H_
+#define SINEGENERATOR_H_
+
+#ifndef SINEGENERATORPARAMETERS_H_
+ #include "SineGeneratorParameters.h"
+#endif
+#ifndef _GLIBCXX_FSTREAM
+ #include <fstream>
+#endif
+#ifndef _GLIBCXX_VECTOR
+ #include <vector>
+#endif
+
+typedef std::vector<short> WaveData;
+typedef WaveData::iterator DataIter;
+
+class SineGenerator {
+public:
+ SineGenerator(SineGeneratorParameters&);
+ virtual ~SineGenerator();
+ void generateWavefile();
+private:
+ static const double PI;
+ SineGeneratorParameters& mParams;
+ WaveData mData;
+ void writeWaveHeader(std::ofstream&);
+ void writeWaveData(std::ofstream&);
+ void generateData();
+};
+
+#endif /* SINEGENERATOR_H_ */