Move the tap_hdr definition into a separate header file.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 7 May 2013 20:47:18 +0000 (22:47 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 7 May 2013 20:47:18 +0000 (22:47 +0200)
decode.cpp
tap.h [new file with mode: 0644]

index 0e88f9d..49be647 100644 (file)
@@ -7,25 +7,18 @@
 #include <algorithm>
 
 #include "interpolate.h"
+#include "tap.h"
 
 #define BUFSIZE 4096
 #define HYSTERESIS_LIMIT 3000
 #define SAMPLE_RATE 44100
 #define C64_FREQUENCY 985248
-#define TAP_RESOLUTION 8
 
 #define SYNC_PULSE_START 1000
 #define SYNC_PULSE_END 15000
 #define SYNC_PULSE_LENGTH 378.0
 #define SYNC_TEST_TOLERANCE 1.10
 
-struct tap_header {
-       char identifier[12];
-       char version;
-       char reserved[3];
-       unsigned int data_len;
-};
-
 // between [x,x+1]
 double find_zerocrossing(const std::vector<short> &pcm, int x)
 {
diff --git a/tap.h b/tap.h
new file mode 100644 (file)
index 0000000..07b055d
--- /dev/null
+++ b/tap.h
@@ -0,0 +1,13 @@
+#ifndef _TAP_H
+#define _TAP_H
+
+#define TAP_RESOLUTION 8
+
+struct tap_header {
+       char identifier[12];
+       char version;
+       char reserved[3];
+       unsigned int data_len;
+};
+
+#endif  // !defined(_TAP_H)