git-svn-id: https://svn.code.sf.net/p/freetel/code@622 01035d8c-6547-0410-b346-abe4f9...
authorwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 17 Aug 2012 20:42:13 +0000 (20:42 +0000)
committerwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 17 Aug 2012 20:42:13 +0000 (20:42 +0000)
45 files changed:
fdmdv2/variants/fdmdv2dll/.cdf [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/ReadMe.txt [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.dll [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.lib [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/dllmain.cpp [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/fdmdv2-dll.aps [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/fdmdv2-dll.cpp [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/fdmdv2-dll.h [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/fdmdv2-dll.rc [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/fdmdv2-dll.sln [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/fdmdv2-project.sdf [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/fdmdv2-project.vcxproj [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/resource.h [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/stdafx.cpp [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/stdafx.h [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/targetver.h [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/App.config [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/Form1.Designer.vb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/Form1.resx [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/Form1.vb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/My Project/Application.Designer.vb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/My Project/Application.myapp [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/My Project/AssemblyInfo.vb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/My Project/Resources.Designer.vb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/My Project/Resources.resx [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/My Project/Settings.Designer.vb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/My Project/Settings.settings [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/bin/Debug/.gitignore [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.exe [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.pdb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.vshost.exe [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.vshost.exe.manifest [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.xml [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Debug/.gitignore [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.read.1.tlog [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.write.1.tlog [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/TempPE/My Project.Resources.Designer.vb.dll [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Form1.resources [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Resources.resources [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.exe [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.pdb [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.vbproj.FileListAbsolute.txt [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.xml [new file with mode: 0644]
fdmdv2/variants/fdmdv2dll/vbTest/vbTest.vbproj [new file with mode: 0644]

diff --git a/fdmdv2/variants/fdmdv2dll/.cdf b/fdmdv2/variants/fdmdv2dll/.cdf
new file mode 100644 (file)
index 0000000..4e6600d
--- /dev/null
@@ -0,0 +1,7 @@
+[CatalogHeader]\r
+Name=.cat\r
+ResultDir=C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\r
+\r
+[CatalogFiles]\r
+<HASH>=\r
+=\r
diff --git a/fdmdv2/variants/fdmdv2dll/ReadMe.txt b/fdmdv2/variants/fdmdv2dll/ReadMe.txt
new file mode 100644 (file)
index 0000000..4657c08
--- /dev/null
@@ -0,0 +1,40 @@
+========================================================================\r
+    DYNAMIC LINK LIBRARY : win32-project Project Overview\r
+========================================================================\r
+\r
+AppWizard has created this win32-project DLL for you.\r
+\r
+This file contains a summary of what you will find in each of the files that\r
+make up your win32-project application.\r
+\r
+\r
+win32-project.vcxproj\r
+    This is the main project file for VC++ projects generated using an Application Wizard.\r
+    It contains information about the version of Visual C++ that generated the file, and\r
+    information about the platforms, configurations, and project features selected with the\r
+    Application Wizard.\r
+\r
+win32-project.vcxproj.filters\r
+    This is the filters file for VC++ projects generated using an Application Wizard. \r
+    It contains information about the association between the files in your project \r
+    and the filters. This association is used in the IDE to show grouping of files with\r
+    similar extensions under a specific node (for e.g. ".cpp" files are associated with the\r
+    "Source Files" filter).\r
+\r
+win32-project.cpp\r
+    This is the main DLL source file.\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+Other standard files:\r
+\r
+StdAfx.h, StdAfx.cpp\r
+    These files are used to build a precompiled header (PCH) file\r
+    named win32-project.pch and a precompiled types file named StdAfx.obj.\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+Other notes:\r
+\r
+AppWizard uses "TODO:" comments to indicate parts of the source code you\r
+should add to or customize.\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
diff --git a/fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.dll b/fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.dll
new file mode 100644 (file)
index 0000000..f4baa09
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.dll differ
diff --git a/fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.lib b/fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.lib
new file mode 100644 (file)
index 0000000..1bcac2d
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/Release/fdmdv2-dll.lib differ
diff --git a/fdmdv2/variants/fdmdv2dll/dllmain.cpp b/fdmdv2/variants/fdmdv2dll/dllmain.cpp
new file mode 100644 (file)
index 0000000..eaa3831
--- /dev/null
@@ -0,0 +1,20 @@
+// dllmain.cpp : Defines the entry point for the DLL application.\r
+#include "stdafx.h"\r
+\r
+BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)\r
+{\r
+       switch (ul_reason_for_call)\r
+       {\r
+        case DLL_PROCESS_ATTACH:\r
+        case DLL_THREAD_ATTACH:\r
+        case DLL_THREAD_DETACH:\r
+        case DLL_PROCESS_DETACH:\r
+        {\r
+            //Disable thread notifications\r
+            DisableThreadLibraryCalls(hModule);\r
+        };\r
+        break;\r
+       }\r
+       return TRUE;\r
+}\r
+\r
diff --git a/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.aps b/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.aps
new file mode 100644 (file)
index 0000000..e358da8
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.aps differ
diff --git a/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.cpp b/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.cpp
new file mode 100644 (file)
index 0000000..0d1f8b8
--- /dev/null
@@ -0,0 +1,1406 @@
+/*---------------------------------------------------------------------------*\\r
+\r
+FILE........: codec2-dll.cpp\r
+AUTHOR......: David Witten  \r
+DATE CREATED: 21 May 2011                                                     \r
+\r
+Wrapper for the Codec2 codec and fdmdv modem APIs.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+/*\r
+All rights reserved.\r
+\r
+This program is free software; you can redistribute it and/or modify\r
+it under the terms of the GNU Lesser General Public License version 2.1, as\r
+published by the Free Software Foundation.  This program is\r
+distributed in the hope that it will be useful, but WITHOUT ANY\r
+WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public\r
+License for more details.\r
+\r
+You should have received a copy of the GNU Lesser General Public License\r
+along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+*/\r
+#define __USE_MATH_DEFINES\r
+\r
+#include "stdafx.h"\r
+#include <assert.h>\r
+#include <stdlib.h>\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <math.h>\r
+#include <limits>\r
+\r
+#include "fdmdv_internal.h"\r
+#include "fdmdv2-dll.h"\r
+#include "rn.h"\r
+#include "test_bits.h"\r
+#include "pilot_coeff.h"\r
+#include "fft.h"\r
+#include "hanning.h"\r
+#include "os.h"\r
+/*\r
+// This is an example of an exported variable\r
+WIN32PROJECT_API int nwin32project=0;\r
+\r
+// This is an example of an exported function.\r
+WIN32PROJECT_API int fnwin32project(void)\r
+{\r
+    return 42;\r
+}\r
+\r
+// This is the constructor of a class that has been exported.\r
+// see win32-project.h for the class definition\r
+Cwin32project::Cwin32project()\r
+{\r
+    return;\r
+}\r
+*/\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FILE........: fdmdv.c\r
+AUTHOR......: David Rowe\r
+DATE CREATED: April 14 2012\r
+\r
+Functions that implement the FDMDV modem.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+/*\r
+Copyright (C) 2012 David Rowe\r
+\r
+All rights reserved.\r
+\r
+This program is free software; you can redistribute it and/or modify\r
+it under the terms of the GNU Lesser General Public License version 2.1, as\r
+published by the Free Software Foundation.  This program is\r
+distributed in the hope that it will be useful, but WITHOUT ANY\r
+WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public\r
+License for more details.\r
+\r
+You should have received a copy of the GNU Lesser General Public License\r
+along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+*/\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+INCLUDES\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTIONS\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+\r
+\r
+static inline double round(double val)\r
+{    \r
+    return floor(val + 0.5);\r
+}\r
+\r
+\r
+\r
+static COMP cneg(COMP a)\r
+{\r
+    COMP res;\r
+\r
+    res.real = -a.real;\r
+    res.imag = -a.imag;\r
+\r
+    return res;\r
+}\r
+\r
+static COMP cconj(COMP a)\r
+{\r
+    COMP res;\r
+\r
+    res.real = a.real;\r
+    res.imag = -a.imag;\r
+\r
+    return res;\r
+}\r
+\r
+static COMP cmult(COMP a, COMP b)\r
+{\r
+    COMP res;\r
+\r
+    res.real = a.real*b.real - a.imag*b.imag;\r
+    res.imag = a.real*b.imag + a.imag*b.real;\r
+\r
+    return res;\r
+}\r
+\r
+static COMP fcmult(float a, COMP b)\r
+{\r
+    COMP res;\r
+\r
+    res.real = a*b.real;\r
+    res.imag = a*b.imag;\r
+\r
+    return res;\r
+}\r
+\r
+static COMP cadd(COMP a, COMP b)\r
+{\r
+    COMP res;\r
+\r
+    res.real = a.real + b.real;\r
+    res.imag = a.imag + b.imag;\r
+\r
+    return res;\r
+}\r
+\r
+static float cabsolute(COMP a)\r
+{\r
+    return sqrt((float)pow((float)a.real, (float)2.0) + (float)pow((float)a.imag, (float)2.0));\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_create          \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 16/4/2012 \r
+\r
+Create and initialise an instance of the modem.  Returns a pointer\r
+to the modem states or NULL on failure.  One set of states is\r
+sufficient for a full duplex modem.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API struct FDMDV *fdmdv_create(void)\r
+{\r
+    struct FDMDV *f;\r
+    int           c, i, k;\r
+    float         carrier_freq;\r
+\r
+    assert(FDMDV_BITS_PER_FRAME == NC*NB);\r
+    assert(FDMDV_NOM_SAMPLES_PER_FRAME == M);\r
+    assert(FDMDV_MAX_SAMPLES_PER_FRAME == (M+M/P));\r
+\r
+    f = (struct FDMDV*)malloc(sizeof(struct FDMDV));\r
+    if (f == NULL)\r
+        return NULL;\r
+\r
+    f->current_test_bit = 0;\r
+    for(i=0; i<NTEST_BITS; i++)\r
+        f->rx_test_bits_mem[i] = 0;\r
+\r
+    f->tx_pilot_bit = 0;\r
+\r
+    for(c=0; c<NC+1; c++) {\r
+        f->prev_tx_symbols[c].real = 1.0;\r
+        f->prev_tx_symbols[c].imag = 0.0;\r
+        f->prev_rx_symbols[c].real = 1.0;\r
+        f->prev_rx_symbols[c].imag = 0.0;\r
+\r
+        for(k=0; k<NFILTER; k++) {\r
+            f->tx_filter_memory[c][k].real = 0.0;\r
+            f->tx_filter_memory[c][k].imag = 0.0;\r
+            f->rx_filter_memory[c][k].real = 0.0;\r
+            f->rx_filter_memory[c][k].imag = 0.0;\r
+        }\r
+\r
+        /* Spread initial FDM carrier phase out as far as possible.\r
+        This helped PAPR for a few dB.  We don't need to adjust rx\r
+        phase as DQPSK takes care of that. */\r
+\r
+        f->phase_tx[c].real = cos(2.0*PI*c/(NC+1));\r
+        f->phase_tx[c].imag = sin(2.0*PI*c/(NC+1));\r
+\r
+        f->phase_rx[c].real = 1.0;\r
+        f->phase_rx[c].imag = 0.0;\r
+\r
+        for(k=0; k<NT*P; k++) {\r
+            f->rx_filter_mem_timing[c][k].real = 0.0;\r
+            f->rx_filter_mem_timing[c][k].imag = 0.0;\r
+        }\r
+        for(k=0; k<NFILTERTIMING; k++) {\r
+            f->rx_baseband_mem_timing[c][k].real = 0.0;\r
+            f->rx_baseband_mem_timing[c][k].imag = 0.0;\r
+        }\r
+    }\r
+\r
+    /* Set up frequency of each carrier */\r
+\r
+    for(c=0; c<NC/2; c++) {\r
+        carrier_freq = (-NC/2 + c)*FSEP + FCENTRE;\r
+        f->freq[c].real = cos(2.0*PI*carrier_freq/FS);\r
+        f->freq[c].imag = sin(2.0*PI*carrier_freq/FS);\r
+    }\r
+\r
+    for(c=NC/2; c<NC; c++) {\r
+        carrier_freq = (-NC/2 + c + 1)*FSEP + FCENTRE;\r
+        f->freq[c].real = cos(2.0*PI*carrier_freq/FS);\r
+        f->freq[c].imag = sin(2.0*PI*carrier_freq/FS);\r
+    }\r
+\r
+    f->freq[NC].real = cos(2.0*PI*FCENTRE/FS);\r
+    f->freq[NC].imag = sin(2.0*PI*FCENTRE/FS);\r
+\r
+    /* Generate DBPSK pilot Look Up Table (LUT) */\r
+\r
+    generate_pilot_lut(f->pilot_lut, &f->freq[NC]);\r
+\r
+    /* freq Offset estimation states */\r
+\r
+    for(i=0; i<NPILOTBASEBAND; i++) {\r
+        f->pilot_baseband1[i].real = f->pilot_baseband2[i].real = 0.0;\r
+        f->pilot_baseband1[i].imag = f->pilot_baseband2[i].imag = 0.0;\r
+    }\r
+    f->pilot_lut_index = 0;\r
+    f->prev_pilot_lut_index = 3*M;\r
+\r
+    for(i=0; i<NPILOTLPF; i++) {\r
+        f->pilot_lpf1[i].real = f->pilot_lpf2[i].real = 0.0;\r
+        f->pilot_lpf1[i].imag = f->pilot_lpf2[i].imag = 0.0;\r
+    }\r
+\r
+    f->foff = 0.0;\r
+    f->foff_rect.real = 1.0;\r
+    f->foff_rect.imag = 0.0;\r
+    f->foff_phase_rect.real = 1.0;\r
+    f->foff_phase_rect.imag = 0.0;\r
+\r
+    f->fest_state = 0;\r
+    f->coarse_fine = COARSE;\r
+\r
+    for(c=0; c<NC+1; c++) {\r
+        f->sig_est[c] = 0.0;\r
+        f->noise_est[c] = 0.0;\r
+    }\r
+\r
+    return f;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_destroy         \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 16/4/2012\r
+\r
+Destroy an instance of the modem.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_destroy(struct FDMDV *fdmdv)\r
+{\r
+    assert(fdmdv != NULL);\r
+    free(fdmdv);\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_get_test_bits()         \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 16/4/2012\r
+\r
+Generate a frame of bits from a repeating sequence of random data.  OK so\r
+it's not very random if it repeats but it makes syncing at the demod easier\r
+for test purposes.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_get_test_bits(struct FDMDV *f, int tx_bits[])\r
+{\r
+    int i;\r
+\r
+    for(i=0; i<FDMDV_BITS_PER_FRAME; i++) {\r
+        tx_bits[i] = test_bits[f->current_test_bit];\r
+        f->current_test_bit++;\r
+        if (f->current_test_bit > (NTEST_BITS-1))\r
+            f->current_test_bit = 0;\r
+    }\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: bits_to_dqpsk_symbols()       \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 16/4/2012\r
+\r
+Maps bits to parallel DQPSK symbols. Generate Nc+1 QPSK symbols from\r
+vector of (1,Nc*Nb) input tx_bits.  The Nc+1 symbol is the +1 -1 +1\r
+.... BPSK sync carrier.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void bits_to_dqpsk_symbols(COMP tx_symbols[], COMP prev_tx_symbols[], int tx_bits[], int *pilot_bit)\r
+{\r
+    int c, msb, lsb;\r
+    COMP j = {0.0,1.0};\r
+\r
+    /* map tx_bits to to Nc DQPSK symbols */\r
+\r
+    for(c=0; c<NC; c++) {\r
+        msb = tx_bits[2*c]; \r
+        lsb = tx_bits[2*c+1];\r
+        if ((msb == 0) && (lsb == 0))\r
+            tx_symbols[c] = prev_tx_symbols[c];\r
+        if ((msb == 0) && (lsb == 1))\r
+            tx_symbols[c] = cmult(j, prev_tx_symbols[c]);\r
+        if ((msb == 1) && (lsb == 0))\r
+            tx_symbols[c] = cneg(prev_tx_symbols[c]);\r
+        if ((msb == 1) && (lsb == 1))\r
+            tx_symbols[c] = cmult(cneg(j),prev_tx_symbols[c]);\r
+    }\r
+\r
+    /* +1 -1 +1 -1 BPSK sync carrier, once filtered becomes (roughly)\r
+    two spectral lines at +/- Rs/2 */\r
+\r
+    if (*pilot_bit)\r
+        tx_symbols[NC] = cneg(prev_tx_symbols[NC]);\r
+    else\r
+        tx_symbols[NC] = prev_tx_symbols[NC];\r
+\r
+    if (*pilot_bit) \r
+        *pilot_bit = 0;\r
+    else\r
+        *pilot_bit = 1;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: tx_filter()           \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 17/4/2012\r
+\r
+Given NC*NB bits construct M samples (1 symbol) of NC+1 filtered\r
+symbols streams.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void tx_filter(COMP tx_baseband[NC+1][M], COMP tx_symbols[], COMP tx_filter_memory[NC+1][NFILTER])\r
+{\r
+    int     c;\r
+    int     i,j,k;\r
+    float   acc;\r
+    COMP    gain;\r
+\r
+    gain.real = sqrt(2.0)/2.0;\r
+    gain.imag = 0.0;\r
+\r
+    for(c=0; c<NC+1; c++)\r
+        tx_filter_memory[c][NFILTER-1] = cmult(tx_symbols[c], gain);\r
+\r
+    /* \r
+    tx filter each symbol, generate M filtered output samples for each symbol.\r
+    Efficient polyphase filter techniques used as tx_filter_memory is sparse\r
+    */\r
+\r
+    for(i=0; i<M; i++) {\r
+        for(c=0; c<NC+1; c++) {\r
+\r
+            /* filter real sample of symbol for carrier c */\r
+\r
+            acc = 0.0;\r
+            for(j=M-1,k=M-i-1; j<NFILTER; j+=M,k+=M)\r
+                acc += M * tx_filter_memory[c][j].real * gt_alpha5_root[k];\r
+            tx_baseband[c][i].real = acc;      \r
+\r
+            /* filter imag sample of symbol for carrier c */\r
+\r
+            acc = 0.0;\r
+            for(j=M-1,k=M-i-1; j<NFILTER; j+=M,k+=M)\r
+                acc += M * tx_filter_memory[c][j].imag * gt_alpha5_root[k];\r
+            tx_baseband[c][i].imag = acc;\r
+\r
+        }\r
+    }\r
+\r
+    /* shift memory, inserting zeros at end */\r
+\r
+    for(i=0; i<NFILTER-M; i++)\r
+        for(c=0; c<NC+1; c++)\r
+            tx_filter_memory[c][i] = tx_filter_memory[c][i+M];\r
+\r
+    for(i=NFILTER-M; i<NFILTER; i++)\r
+        for(c=0; c<NC+1; c++) {\r
+            tx_filter_memory[c][i].real = 0.0;\r
+            tx_filter_memory[c][i].imag = 0.0;\r
+        }\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdm_upconvert()       \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 17/4/2012\r
+\r
+Construct FDM signal by frequency shifting each filtered symbol\r
+stream.  Returns complex signal so we can apply frequency offsets\r
+easily.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void fdm_upconvert(COMP tx_fdm[], COMP tx_baseband[NC+1][M], COMP phase_tx[], COMP freq[])\r
+{\r
+    int  i,c;\r
+    COMP two = {2.0, 0.0};\r
+    COMP pilot;\r
+\r
+    for(i=0; i<M; i++) {\r
+        tx_fdm[i].real = 0.0;\r
+        tx_fdm[i].imag = 0.0;\r
+    }\r
+\r
+    /* Nc/2 tones below centre freq */\r
+\r
+    for (c=0; c<NC/2; c++) \r
+        for (i=0; i<M; i++) {\r
+            phase_tx[c] = cmult(phase_tx[c], freq[c]);\r
+            tx_fdm[i] = cadd(tx_fdm[i], cmult(tx_baseband[c][i], phase_tx[c]));\r
+        }\r
+\r
+        /* Nc/2 tones above centre freq */\r
+\r
+        for (c=NC/2; c<NC; c++) \r
+            for (i=0; i<M; i++) {\r
+                phase_tx[c] = cmult(phase_tx[c], freq[c]);\r
+                tx_fdm[i] = cadd(tx_fdm[i], cmult(tx_baseband[c][i], phase_tx[c]));\r
+            }\r
+\r
+            /* add centre pilot tone  */\r
+\r
+            c = NC;\r
+            for (i=0; i<M; i++) {\r
+                phase_tx[c] = cmult(phase_tx[c],  freq[c]);\r
+                pilot = cmult(cmult(two, tx_baseband[c][i]), phase_tx[c]);\r
+                tx_fdm[i] = cadd(tx_fdm[i], pilot);\r
+            }\r
+\r
+            /*\r
+            Scale such that total Carrier power C of real(tx_fdm) = Nc.  This\r
+            excludes the power of the pilot tone.\r
+            We return the complex (single sided) signal to make frequency\r
+            shifting for the purpose of testing easier\r
+            */\r
+\r
+            for (i=0; i<M; i++) \r
+                tx_fdm[i] = cmult(two, tx_fdm[i]);\r
+\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_mod()           \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 26/4/2012\r
+\r
+FDMDV modulator, take a frame of FDMDV_BITS_PER_FRAME bits and\r
+generates a frame of FDMDV_SAMPLES_PER_FRAME modulated symbols.\r
+Sync bit is returned to aid alignment of your next frame.  The\r
+sync_bit value returned will be used for the _next_ frame.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_mod(struct FDMDV *fdmdv, COMP tx_fdm[], int tx_bits[], int *sync_bit)\r
+{\r
+    COMP          tx_symbols[NC+1];\r
+    COMP          tx_baseband[NC+1][M];\r
+\r
+    bits_to_dqpsk_symbols(tx_symbols, fdmdv->prev_tx_symbols, tx_bits, &fdmdv->tx_pilot_bit);\r
+    memcpy(fdmdv->prev_tx_symbols, tx_symbols, sizeof(COMP)*(NC+1));\r
+    tx_filter(tx_baseband, tx_symbols, fdmdv->tx_filter_memory);\r
+    fdm_upconvert(tx_fdm, tx_baseband, fdmdv->phase_tx, fdmdv->freq);\r
+\r
+    *sync_bit = fdmdv->tx_pilot_bit;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: generate_pilot_fdm()          \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 19/4/2012\r
+\r
+Generate M samples of DBPSK pilot signal for Freq offset estimation.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void generate_pilot_fdm(COMP *pilot_fdm, int *bit, float *symbol, float *filter_mem, COMP *phase, COMP *freq)\r
+{\r
+    int   i,j,k;\r
+    float tx_baseband[M];\r
+\r
+    /* +1 -1 +1 -1 DBPSK sync carrier, once filtered becomes (roughly)\r
+    two spectral lines at +/- RS/2 */\r
+\r
+    if (*bit)\r
+        *symbol = -*symbol;\r
+    else\r
+        *symbol = *symbol;\r
+    if (*bit) \r
+        *bit = 0;\r
+    else\r
+        *bit = 1;\r
+\r
+    /* filter DPSK symbol to create M baseband samples */\r
+\r
+    filter_mem[NFILTER-1] = (float)(sqrt(2.0)/2) * *symbol;\r
+    for(i=0; i<M; i++) \r
+    {\r
+        tx_baseband[i] = 0.0; \r
+        for(j=M-1,k=M-i-1; j<NFILTER; j+=M,k+=M)\r
+            tx_baseband[i] += M * filter_mem[j] * gt_alpha5_root[k];\r
+    }\r
+\r
+    /* shift memory, inserting zeros at end */\r
+\r
+    for(i=0; i<NFILTER-M; i++)\r
+        filter_mem[i] = filter_mem[i+M];\r
+\r
+    for(i=NFILTER-M; i<NFILTER; i++)\r
+        filter_mem[i] = 0.0;\r
+\r
+    /* upconvert */\r
+\r
+    for(i=0; i<M; i++) \r
+    {\r
+        *phase = cmult(*phase, *freq);\r
+        pilot_fdm[i].real = sqrt(2.0)*2*tx_baseband[i] * phase->real;\r
+        pilot_fdm[i].imag = sqrt(2.0)*2*tx_baseband[i] * phase->imag;\r
+    }\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: generate_pilot_lut()          \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 19/4/2012\r
+\r
+Generate a 4M sample vector of DBPSK pilot signal.  As the pilot signal\r
+is periodic in 4M samples we can then use this vector as a look up table\r
+for pilot signal generation in the demod.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void generate_pilot_lut(COMP pilot_lut[], COMP *pilot_freq)\r
+{\r
+    int   pilot_rx_bit = 0;\r
+    float pilot_symbol = sqrt(2.0);\r
+    COMP  pilot_phase  = {1.0, 0.0};\r
+    float pilot_filter_mem[NFILTER];\r
+    COMP  pilot[M];\r
+    int   i,f;\r
+\r
+    for(i=0; i<NFILTER; i++)\r
+        pilot_filter_mem[i] = 0.0;\r
+\r
+    /* discard first 4 symbols as filter memory is filling, just keep\r
+    last four symbols */\r
+\r
+    for(f=0; f<8; f++) {\r
+        generate_pilot_fdm(pilot, &pilot_rx_bit, &pilot_symbol, pilot_filter_mem, &pilot_phase, pilot_freq);\r
+        if (f >= 4)\r
+            memcpy(&pilot_lut[M*(f-4)], pilot, M*sizeof(COMP));\r
+    }\r
+\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: lpf_peak_pick()       \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 20/4/2012\r
+\r
+LPF and peak pick part of freq est, put in a function as we call it twice.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void lpf_peak_pick(float *foff, float *max, COMP pilot_baseband[], COMP pilot_lpf[], COMP S[], int nin)\r
+{\r
+    int   i,j,k;\r
+    int   mpilot;\r
+    float mag, imax;\r
+    int   ix;\r
+    float r;\r
+\r
+    /* LPF cutoff 200Hz, so we can handle max +/- 200 Hz freq offset */\r
+\r
+    for(i=0; i<NPILOTLPF-nin; i++)\r
+    {\r
+        pilot_lpf[i] = pilot_lpf[nin+i];\r
+    }\r
+    for(i=NPILOTLPF-nin, j=0; i<NPILOTLPF; i++,j++) \r
+    {\r
+        pilot_lpf[i].real = 0.0; pilot_lpf[i].imag = 0.0;\r
+        for(k=0; k<NPILOTCOEFF; k++)\r
+            pilot_lpf[i] = cadd(pilot_lpf[i], fcmult(pilot_coeff[k], pilot_baseband[j+k]));\r
+    }\r
+\r
+    /* decimate to improve DFT resolution, window and DFT */\r
+    mpilot = FS/(2*200);  /* calc decimation rate given new sample rate is twice LPF freq */\r
+    for(i=0; i<MPILOTFFT; i++) \r
+    {\r
+        S[i].real = 0.0; S[i].imag = 0.0;\r
+    }\r
+    for(i=0,j=0; i<NPILOTLPF; i+=mpilot,j++) \r
+    {\r
+        S[j] = fcmult(hanning[i], pilot_lpf[i]);\r
+    }\r
+\r
+    fft(&S[0].real, MPILOTFFT, -1);\r
+\r
+    /* peak pick and convert to Hz */\r
+\r
+    imax = 0.0;\r
+    ix = 0;\r
+    for(i=0; i<MPILOTFFT; i++) \r
+    {\r
+        mag = S[i].real*S[i].real + S[i].imag*S[i].imag;\r
+        if (mag > imax) \r
+        {\r
+            imax = mag;\r
+            ix = i;\r
+        }\r
+    }\r
+    r = 2.0*200.0/MPILOTFFT;     /* maps FFT bin to frequency in Hz */\r
+\r
+    if (ix >= MPILOTFFT/2)\r
+        *foff = (ix - MPILOTFFT)*r;\r
+    else\r
+        *foff = (ix)*r;\r
+    *max = imax;\r
+\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: rx_est_freq_offset()          \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 19/4/2012\r
+\r
+Estimate frequency offset of FDM signal using BPSK pilot.  Note that\r
+this algorithm is quite sensitive to pilot tone level wrt other\r
+carriers, so test variations to the pilot amplitude carefully.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+float rx_est_freq_offset(struct FDMDV *f, float rx_fdm[], int nin)\r
+{\r
+    int  i,j;\r
+    COMP pilot[M+M/P];\r
+    COMP prev_pilot[M+M/P];\r
+    float foff, foff1, foff2;\r
+    float   max1, max2;\r
+\r
+    assert(nin <= M+M/P);\r
+\r
+    /* get pilot samples used for correlation/down conversion of rx signal */\r
+\r
+    for (i=0; i<nin; i++) {\r
+        pilot[i] = f->pilot_lut[f->pilot_lut_index];\r
+        f->pilot_lut_index++;\r
+        if (f->pilot_lut_index >= 4*M)\r
+            f->pilot_lut_index = 0;\r
+\r
+        prev_pilot[i] = f->pilot_lut[f->prev_pilot_lut_index];\r
+        f->prev_pilot_lut_index++;\r
+        if (f->prev_pilot_lut_index >= 4*M)\r
+            f->prev_pilot_lut_index = 0;\r
+    }\r
+\r
+    /*\r
+    Down convert latest M samples of pilot by multiplying by ideal\r
+    BPSK pilot signal we have generated locally.  The peak of the\r
+    resulting signal is sensitive to the time shift between the\r
+    received and local version of the pilot, so we do it twice at\r
+    different time shifts and choose the maximum.\r
+    */\r
+\r
+    for(i=0; i<NPILOTBASEBAND-nin; i++) {\r
+        f->pilot_baseband1[i] = f->pilot_baseband1[i+nin];\r
+        f->pilot_baseband2[i] = f->pilot_baseband2[i+nin];\r
+    }\r
+\r
+    for(i=0,j=NPILOTBASEBAND-nin; i<nin; i++,j++) {\r
+        f->pilot_baseband1[j] = fcmult(rx_fdm[i], cconj(pilot[i]));\r
+        f->pilot_baseband2[j] = fcmult(rx_fdm[i], cconj(prev_pilot[i]));\r
+    }\r
+\r
+    lpf_peak_pick(&foff1, &max1, f->pilot_baseband1, f->pilot_lpf1, f->S1, nin);\r
+    lpf_peak_pick(&foff2, &max2, f->pilot_baseband2, f->pilot_lpf2, f->S2, nin);\r
+\r
+    if (max1 > max2)\r
+        foff = foff1;\r
+    else\r
+        foff = foff2;\r
+\r
+    return foff;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: freq_shift()          \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 26/4/2012\r
+\r
+Frequency shift modem signal.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void freq_shift(COMP rx_fdm_fcorr[], float rx_fdm[], float foff, COMP *foff_rect, COMP *foff_phase_rect, int nin)\r
+{\r
+    int i;\r
+\r
+    foff_rect->real = cos(2.0*PI*foff/FS);\r
+    foff_rect->imag = sin(2.0*PI*foff/FS);\r
+    for(i=0; i<nin; i++) {\r
+        *foff_phase_rect = cmult(*foff_phase_rect, cconj(*foff_rect));\r
+        rx_fdm_fcorr[i] = fcmult(rx_fdm[i], *foff_phase_rect);\r
+    }\r
+\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdm_downconvert()             \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 22/4/2012\r
+\r
+Frequency shift each modem carrier down to Nc+1 baseband signals.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void fdm_downconvert(COMP rx_baseband[NC+1][M+M/P], COMP rx_fdm[], COMP phase_rx[], COMP freq[], int nin)\r
+{\r
+    int  i,c;\r
+\r
+    /* maximum number of input samples to demod */\r
+\r
+    assert(nin <= (M+M/P));\r
+\r
+    /* Nc/2 tones below centre freq */\r
+\r
+    for (c=0; c<NC/2; c++) \r
+        for (i=0; i<nin; i++) {\r
+            phase_rx[c] = cmult(phase_rx[c], freq[c]);\r
+            rx_baseband[c][i] = cmult(rx_fdm[i], cconj(phase_rx[c]));\r
+        }\r
+\r
+        /* Nc/2 tones above centre freq */\r
+\r
+        for (c=NC/2; c<NC; c++) \r
+            for (i=0; i<nin; i++) {\r
+                phase_rx[c] = cmult(phase_rx[c], freq[c]);\r
+                rx_baseband[c][i] = cmult(rx_fdm[i], cconj(phase_rx[c]));\r
+            }\r
+\r
+            /* centre pilot tone  */\r
+\r
+            c = NC;\r
+            for (i=0; i<nin; i++) {\r
+                phase_rx[c] = cmult(phase_rx[c],  freq[c]);\r
+                rx_baseband[c][i] = cmult(rx_fdm[i], cconj(phase_rx[c]));\r
+            }\r
+\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: rx_filter()           \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 22/4/2012\r
+\r
+Receive filter each baseband signal at oversample rate P.  Filtering at\r
+rate P lowers CPU compared to rate M.\r
+\r
+Depending on the number of input samples to the demod nin, we\r
+produce P-1, P (usually), or P+1 filtered samples at rate P.  nin is\r
+occasionally adjusted to compensate for timing slips due to\r
+different tx and rx sample clocks.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void rx_filter(COMP rx_filt[NC+1][P+1], COMP rx_baseband[NC+1][M+M/P], COMP rx_filter_memory[NC+1][NFILTER], int nin)\r
+{\r
+    int c, i,j,k,l;\r
+    int n=M/P;\r
+\r
+    /* rx filter each symbol, generate P filtered output samples for\r
+    each symbol.  Note we keep filter memory at rate M, it's just\r
+    the filter output at rate P */\r
+\r
+    for(i=0, j=0; i<nin; i+=n,j++) {\r
+\r
+        /* latest input sample */\r
+\r
+        for(c=0; c<NC+1; c++)\r
+            for(k=NFILTER-n,l=i; k<NFILTER; k++,l++)   \r
+                rx_filter_memory[c][k] = rx_baseband[c][l];\r
+\r
+        /* convolution (filtering) */\r
+\r
+        for(c=0; c<NC+1; c++) {\r
+            rx_filt[c][j].real = 0.0; rx_filt[c][j].imag = 0.0;\r
+            for(k=0; k<NFILTER; k++) \r
+                rx_filt[c][j] = cadd(rx_filt[c][j], fcmult(gt_alpha5_root[k], rx_filter_memory[c][k]));\r
+        }\r
+\r
+        /* make room for next input sample */\r
+\r
+        for(c=0; c<NC+1; c++)\r
+            for(k=0,l=n; k<NFILTER-n; k++,l++) \r
+                rx_filter_memory[c][k] = rx_filter_memory[c][l];\r
+    }\r
+\r
+    assert(j <= (P+1)); /* check for any over runs */\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: rx_est_timing()       \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 23/4/2012\r
+\r
+Estimate optimum timing offset, re-filter receive symbols at optimum\r
+timing estimate.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+float rx_est_timing(COMP rx_symbols[], \r
+    COMP rx_filt[NC+1][P+1], \r
+    COMP rx_baseband[NC+1][M+M/P], \r
+    COMP rx_filter_mem_timing[NC+1][NT*P], \r
+    float env[],\r
+    COMP rx_baseband_mem_timing[NC+1][NFILTERTIMING], \r
+    int nin)    \r
+{\r
+    int   c,i,j,k;\r
+    int   adjust, s;\r
+    COMP  x, phase, freq;\r
+    float rx_timing;\r
+\r
+    /*\r
+    nin  adjust \r
+    --------------------------------\r
+    120  -1 (one less rate P sample)\r
+    160   0 (nominal)\r
+    200   1 (one more rate P sample)\r
+    */\r
+\r
+    adjust = P - nin*P/M;\r
+\r
+    /* update buffer of NT rate P filtered symbols */\r
+\r
+    for(c=0; c<NC+1; c++) \r
+        for(i=0,j=P-adjust; i<(NT-1)*P+adjust; i++,j++)\r
+            rx_filter_mem_timing[c][i] = rx_filter_mem_timing[c][j];\r
+    for(c=0; c<NC+1; c++) \r
+        for(i=(NT-1)*P+adjust,j=0; i<NT*P; i++,j++)\r
+            rx_filter_mem_timing[c][i] = rx_filt[c][j];\r
+\r
+    /* sum envelopes of all carriers */\r
+\r
+    for(i=0; i<NT*P; i++) {\r
+        env[i] = 0.0;\r
+        for(c=0; c<NC+1; c++)\r
+            env[i] += cabsolute(rx_filter_mem_timing[c][i]);\r
+    }\r
+\r
+    /* The envelope has a frequency component at the symbol rate.  The\r
+    phase of this frequency component indicates the timing.  So work\r
+    out single DFT at frequency 2*pi/P */\r
+\r
+    x.real = 0.0; x.imag = 0.0;\r
+    freq.real = cos(2*PI/P);\r
+    freq.imag = sin(2*PI/P);\r
+    phase.real = 1.0;\r
+    phase.imag = 0.0;\r
+\r
+    for(i=0; i<NT*P; i++) {\r
+        x = cadd(x, fcmult(env[i], phase));\r
+        phase = cmult(phase, freq);\r
+    }\r
+\r
+    /* Map phase to estimated optimum timing instant at rate M.  The\r
+    M/4 part was adjusted by experiment, I know not why.... */\r
+\r
+    rx_timing = atan2(x.imag, x.real)*M/(2*PI) + M/4;\r
+\r
+    if (rx_timing > M)\r
+        rx_timing -= M;\r
+    if (rx_timing < -M)\r
+        rx_timing += M;\r
+\r
+    /* rx_filt_mem_timing contains M + Nfilter + M samples of the\r
+    baseband signal at rate M this enables us to resample the\r
+    filtered rx symbol with M sample precision once we have\r
+    rx_timing */\r
+\r
+    for(c=0; c<NC+1; c++) \r
+        for(i=0,j=nin; i<NFILTERTIMING-nin; i++,j++)\r
+            rx_baseband_mem_timing[c][i] = rx_baseband_mem_timing[c][j];\r
+    for(c=0; c<NC+1; c++) \r
+        for(i=NFILTERTIMING-nin,j=0; i<NFILTERTIMING; i++,j++)\r
+            rx_baseband_mem_timing[c][i] = rx_baseband[c][j];\r
+\r
+    /* rx filter to get symbol for each carrier at estimated optimum\r
+    timing instant.  We use rate M filter memory to get fine timing\r
+    resolution. */\r
+\r
+    s = round(rx_timing) + M;\r
+    for(c=0; c<NC+1; c++) {\r
+        rx_symbols[c].real = 0.0;\r
+        rx_symbols[c].imag = 0.0;\r
+        for(k=s,j=0; k<s+NFILTER; k++,j++)\r
+            rx_symbols[c] = cadd(rx_symbols[c], fcmult(gt_alpha5_root[j], rx_baseband_mem_timing[c][k]));\r
+    }\r
+\r
+    return rx_timing;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: qpsk_to_bits()        \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 24/4/2012\r
+\r
+Convert DQPSK symbols back to an array of bits, extracts sync bit\r
+from DBPSK pilot, and also uses pilot to estimate fine frequency\r
+error.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+float qpsk_to_bits(int rx_bits[], int *sync_bit, COMP phase_difference[], COMP prev_rx_symbols[], COMP rx_symbols[])\r
+{\r
+    int   c;\r
+    COMP  pi_on_4;\r
+    COMP  d;\r
+    int   msb=0, lsb=0;\r
+    float ferr;\r
+\r
+    pi_on_4.real = cos(PI/4.0);\r
+    pi_on_4.imag = sin(PI/4.0);\r
+\r
+    /* Extra 45 degree clockwise lets us use real and imag axis as\r
+    decision boundaries */\r
+\r
+    for(c=0; c<NC; c++)\r
+        phase_difference[c] = cmult(cmult(rx_symbols[c], cconj(prev_rx_symbols[c])), pi_on_4);\r
+\r
+    /* map (Nc,1) DQPSK symbols back into an (1,Nc*Nb) array of bits */\r
+\r
+    for (c=0; c<NC; c++) {\r
+        d = phase_difference[c];\r
+        if ((d.real >= 0) && (d.imag >= 0)) {\r
+            msb = 0; lsb = 0;\r
+        }\r
+        if ((d.real < 0) && (d.imag >= 0)) {\r
+            msb = 0; lsb = 1;\r
+        }\r
+        if ((d.real < 0) && (d.imag < 0)) {\r
+            msb = 1; lsb = 0;\r
+        }\r
+        if ((d.real >= 0) && (d.imag < 0)) {\r
+            msb = 1; lsb = 1;\r
+        }\r
+        rx_bits[2*c] = msb;\r
+        rx_bits[2*c+1] = lsb;\r
+    }\r
+\r
+    /* Extract DBPSK encoded Sync bit and fine freq offset estimate */\r
+\r
+    phase_difference[NC] = cmult(rx_symbols[NC], cconj(prev_rx_symbols[NC]));\r
+    if (phase_difference[NC].real < 0) {\r
+        *sync_bit = 1;\r
+        ferr = phase_difference[NC].imag;\r
+    }\r
+    else {\r
+        *sync_bit = 0;\r
+        ferr = -phase_difference[NC].imag;\r
+    }\r
+\r
+    /* pilot carrier gets an extra pi/4 rotation to make it consistent\r
+    with other carriers, as we need it for snr_update and scatter\r
+    diagram */\r
+\r
+    phase_difference[NC] = cmult(phase_difference[NC], pi_on_4);\r
+\r
+    return ferr;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: snr_update()          \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 17 May 2012\r
+\r
+Given phase differences update estimates of signal and noise levels.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+void snr_update(float sig_est[], float noise_est[], COMP phase_difference[])\r
+{\r
+    float s[NC+1];\r
+    COMP  refl_symbols[NC+1];\r
+    float n[NC+1];\r
+    COMP  pi_on_4;\r
+    int   c;\r
+\r
+    pi_on_4.real = cos(PI/4.0);\r
+    pi_on_4.imag = sin(PI/4.0);\r
+\r
+    /* mag of each symbol is distance from origin, this gives us a\r
+    vector of mags, one for each carrier. */\r
+\r
+    for(c=0; c<NC+1; c++)\r
+        s[c] = cabsolute(phase_difference[c]);\r
+\r
+    /* signal mag estimate for each carrier is a smoothed version of\r
+    instantaneous magntitude, this gives us a vector of smoothed\r
+    mag estimates, one for each carrier. */\r
+\r
+    for(c=0; c<NC+1; c++)\r
+        sig_est[c] = SNR_COEFF*sig_est[c] + (1.0 - SNR_COEFF)*s[c];\r
+\r
+    /* noise mag estimate is distance of current symbol from average\r
+    location of that symbol.  We reflect all symbols into the first\r
+    quadrant for convenience. */\r
+\r
+    for(c=0; c<NC+1; c++) {\r
+        refl_symbols[c].real = fabs(phase_difference[c].real);\r
+        refl_symbols[c].imag = fabs(phase_difference[c].imag);    \r
+        n[c] = cabsolute(cadd(fcmult(sig_est[c], pi_on_4), cneg(refl_symbols[c])));\r
+    }\r
+\r
+    /* noise mag estimate for each carrier is a smoothed version of\r
+    instantaneous noise mag, this gives us a vector of smoothed\r
+    noise power estimates, one for each carrier. */\r
+\r
+    for(c=0; c<NC+1; c++)\r
+        noise_est[c] = SNR_COEFF*noise_est[c] + (1 - SNR_COEFF)*n[c];\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_put_test_bits()         \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 24/4/2012\r
+\r
+Accepts nbits from rx and attempts to sync with test_bits sequence.\r
+If sync OK measures bit errors.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_put_test_bits(struct FDMDV *f, int *sync, int *bit_errors, int *ntest_bits, int rx_bits[])\r
+{\r
+    int   i,j;\r
+    float ber;\r
+\r
+    /* Append to our memory */\r
+\r
+    for(i=0,j=FDMDV_BITS_PER_FRAME; i<NTEST_BITS-FDMDV_BITS_PER_FRAME; i++,j++)\r
+        f->rx_test_bits_mem[i] = f->rx_test_bits_mem[j];\r
+    for(i=NTEST_BITS-FDMDV_BITS_PER_FRAME,j=0; i<NTEST_BITS; i++,j++)\r
+        f->rx_test_bits_mem[i] = rx_bits[j];\r
+\r
+    /* see how many bit errors we get when checked against test sequence */\r
+\r
+    *bit_errors = 0;\r
+    for(i=0; i<NTEST_BITS; i++) {\r
+        *bit_errors += test_bits[i] ^ f->rx_test_bits_mem[i];\r
+        //printf("%d %d %d %d\n", i, test_bits[i], f->rx_test_bits_mem[i], test_bits[i] ^ f->rx_test_bits_mem[i]);\r
+    }\r
+\r
+    /* if less than a thresh we are aligned and in sync with test sequence */\r
+\r
+    ber = (float)*bit_errors/NTEST_BITS;\r
+\r
+    *sync = 0;\r
+    if (ber < 0.2)\r
+        *sync = 1;\r
+\r
+    *ntest_bits = NTEST_BITS;\r
+\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: freq_state(()         \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 24/4/2012\r
+\r
+Freq offset state machine.  Moves between coarse and fine states\r
+based on BPSK pilot sequence.  Freq offset estimator occasionally\r
+makes mistakes when used continuously.  So we use it until we have\r
+acquired the BPSK pilot, then switch to a more robust "fine"\r
+tracking algorithm.  If we lose sync we switch back to coarse mode\r
+for fast-requisition of large frequency offsets.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+int freq_state(int sync_bit, int *state)\r
+{\r
+    int next_state, coarse_fine;\r
+\r
+    /* acquire state, look for 6 symbol 010101 sequence from sync bit */\r
+\r
+    next_state = *state;\r
+    switch(*state) {\r
+    case 0:\r
+        if (sync_bit == 0)\r
+            next_state = 1;\r
+        break;\r
+    case 1:\r
+        if (sync_bit == 1)\r
+            next_state = 2;\r
+        else \r
+            next_state = 0;\r
+        break;\r
+    case 2:\r
+        if (sync_bit == 0)\r
+            next_state = 3;\r
+        else \r
+            next_state = 0;\r
+        break;\r
+    case 3:\r
+        if (sync_bit == 1)\r
+            next_state = 4;\r
+        else \r
+            next_state = 0;\r
+        break;\r
+    case 4:\r
+        if (sync_bit == 0)\r
+            next_state = 5;\r
+        else \r
+            next_state = 0;\r
+        break;\r
+    case 5:\r
+        if (sync_bit == 1)\r
+            next_state = 6;\r
+        else \r
+            next_state = 0;\r
+        break;\r
+\r
+        /* states 6 and above are track mode, make sure we keep\r
+        getting 0101 sync bit sequence */\r
+\r
+    case 6:\r
+        if (sync_bit == 0)\r
+            next_state = 7;\r
+        else \r
+            next_state = 0;\r
+\r
+        break;\r
+    case 7:\r
+        if (sync_bit == 1)\r
+            next_state = 6;\r
+        else \r
+            next_state = 0;\r
+        break;\r
+    }\r
+\r
+    *state = next_state;\r
+    if (*state >= 6)\r
+        coarse_fine = FINE;\r
+    else\r
+        coarse_fine = COARSE;\r
+\r
+    return coarse_fine;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_demod()         \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 26/4/2012\r
+\r
+FDMDV demodulator, take an array of FDMDV_SAMPLES_PER_FRAME\r
+modulated symbols, returns an array of FDMDV_BITS_PER_FRAME bits,\r
+plus the sync bit.  \r
+\r
+The number of input samples nin will normally be M ==\r
+FDMDV_SAMPLES_PER_FRAME.  However to adjust for differences in\r
+transmit and receive sample clocks nin will occasionally be M-M/P,\r
+or M+M/P.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_demod(struct FDMDV *fdmdv, int rx_bits[], int *sync_bit, float rx_fdm[], int *nin)\r
+{\r
+    float         foff_coarse, foff_fine;\r
+    COMP          rx_fdm_fcorr[M+M/P];\r
+    COMP          rx_baseband[NC+1][M+M/P];\r
+    COMP          rx_filt[NC+1][P+1];\r
+    COMP          rx_symbols[NC+1];\r
+    float         env[NT*P];\r
+\r
+    /* freq offset estimation and correction */\r
+\r
+    foff_coarse = rx_est_freq_offset(fdmdv, rx_fdm, *nin);\r
+\r
+    if (fdmdv->coarse_fine == COARSE)\r
+        fdmdv->foff = foff_coarse;\r
+    freq_shift(rx_fdm_fcorr, rx_fdm, fdmdv->foff, &fdmdv->foff_rect, &fdmdv->foff_phase_rect, *nin);\r
+\r
+    /* baseband processing */\r
+\r
+    fdm_downconvert(rx_baseband, rx_fdm_fcorr, fdmdv->phase_rx, fdmdv->freq, *nin);\r
+    rx_filter(rx_filt, rx_baseband, fdmdv->rx_filter_memory, *nin);\r
+    fdmdv->rx_timing = rx_est_timing(rx_symbols, rx_filt, rx_baseband, fdmdv->rx_filter_mem_timing, env, fdmdv->rx_baseband_mem_timing, *nin);  \r
+\r
+    /* adjust number of input samples to keep timing within bounds */\r
+\r
+    *nin = M;\r
+\r
+    if (fdmdv->rx_timing > 2*M/P)\r
+        *nin += M/P;\r
+\r
+    if (fdmdv->rx_timing < 0)\r
+        *nin -= M/P;\r
+\r
+    foff_fine = qpsk_to_bits(rx_bits, sync_bit, fdmdv->phase_difference, fdmdv->prev_rx_symbols, rx_symbols);\r
+    memcpy(fdmdv->prev_rx_symbols, rx_symbols, sizeof(COMP)*(NC+1));\r
+    snr_update(fdmdv->sig_est, fdmdv->noise_est, fdmdv->phase_difference);\r
+\r
+    /* freq offset estimation state machine */\r
+\r
+    fdmdv->coarse_fine = freq_state(*sync_bit, &fdmdv->fest_state);\r
+    fdmdv->foff  -= TRACK_COEFF*foff_fine;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: calc_snr()            \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 17 May 2012\r
+\r
+Calculate current SNR estimate (3000Hz noise BW)\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+float calc_snr(float sig_est[], float noise_est[])\r
+{\r
+    float S, SdB;\r
+    float mean, N50, N50dB, N3000dB;\r
+    float snr_dB;\r
+    int   c;\r
+\r
+    S = 0.0;\r
+    for(c=0; c<NC+1; c++)\r
+        S += pow((float)sig_est[c], (float)2.0);\r
+    SdB = 10.0*log10(S);\r
+\r
+    /* Average noise mag across all carriers and square to get an\r
+    average noise power.  This is an estimate of the noise power in\r
+    Rs = 50Hz of BW (note for raised root cosine filters Rs is the\r
+    noise BW of the filter) */\r
+\r
+    mean = 0.0;\r
+    for(c=0; c<NC+1; c++)\r
+        mean += noise_est[c];\r
+    mean /= (NC+1);\r
+    N50 = (float)pow((float)mean, (float)2.0);\r
+    N50dB = 10.0*log10(N50);\r
+\r
+    /* Now multiply by (3000 Hz)/(50 Hz) to find the total noise power\r
+    in 3000 Hz */\r
+\r
+    N3000dB = N50dB + 10.0*log10(3000.0/RS);\r
+\r
+    snr_dB = SdB - N3000dB;\r
+\r
+    return snr_dB;\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_get_demod_stats()       \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 1 May 2012\r
+\r
+Fills stats structure with a bunch of demod information.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_get_demod_stats(struct FDMDV *fdmdv, struct FDMDV_STATS *fdmdv_stats)\r
+{\r
+    int   c;\r
+\r
+    fdmdv_stats->snr_est = calc_snr(fdmdv->sig_est, fdmdv->noise_est);\r
+    fdmdv_stats->fest_coarse_fine = fdmdv->coarse_fine;\r
+    fdmdv_stats->foff = fdmdv->foff;\r
+    fdmdv_stats->rx_timing = fdmdv->rx_timing;\r
+    fdmdv_stats->clock_offset = 0.0; /* TODO - implement clock offset estimation */\r
+\r
+    assert((NC+1) == FDMDV_NSYM);\r
+\r
+    for(c=0; c<NC+1; c++) {\r
+        fdmdv_stats->rx_symbols[c] = fdmdv->phase_difference[c];\r
+    }\r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_8_to_48()       \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 9 May 2012\r
+\r
+Changes the sample rate of a signal from 8 to 48 kHz.  Experience\r
+with PC based modems has shown that PC sound cards have a more\r
+accurate sample clock when set for 48 kHz than 8 kHz.\r
+\r
+n is the number of samples at the 8 kHz rate, there are FDMDV_OS*n samples\r
+at the 48 kHz rate.  A memory of FDMDV_OS_TAPS/FDMDV_OS samples is reqd for\r
+in8k[] (see t48_8.c unit test as example).\r
+\r
+This is a classic polyphase upsampler.  We take the 8 kHz samples\r
+and insert (FDMDV_OS-1) zeroes between each sample, then\r
+FDMDV_OS_TAPS FIR low pass filter the signal at 4kHz.  As most of\r
+the input samples are zeroes, we only need to multiply non-zero\r
+input samples by filter coefficients.  The zero insertion and\r
+filtering are combined in the code below and I'm too lazy to explain\r
+it further right now....\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_8_to_48(float out48k[], float in8k[], int n)\r
+{\r
+    int i,j,k,l;\r
+\r
+    for(i=0; i<n; i++) {\r
+        for(j=0; j<FDMDV_OS; j++) {\r
+            out48k[i*FDMDV_OS+j] = 0.0;\r
+            for(k=0,l=0; k<FDMDV_OS_TAPS; k+=FDMDV_OS,l++)\r
+                out48k[i*FDMDV_OS+j] += fdmdv_os_filter[k+j]*in8k[i-l];\r
+            out48k[i*FDMDV_OS+j] *= FDMDV_OS;\r
+\r
+        }\r
+    }  \r
+}\r
+\r
+/*---------------------------------------------------------------------------*\\r
+\r
+FUNCTION....: fdmdv_48_to_8()       \r
+AUTHOR......: David Rowe                             \r
+DATE CREATED: 9 May 2012\r
+\r
+Changes the sample rate of a signal from 48 to 8 kHz.\r
+\r
+n is the number of samples at the 8 kHz rate, there are FDMDV_OS*n\r
+samples at the 48 kHz rate.  As above however a memory of\r
+FDMDV_OS_TAPS samples is reqd for in48k[] (see t48_8.c unit test as example).\r
+\r
+Low pass filter the 48 kHz signal at 4 kHz using the same filter as\r
+the upsampler, then just output every FDMDV_OS-th filtered sample.\r
+\r
+\*---------------------------------------------------------------------------*/\r
+\r
+WIN32PROJECT_API void fdmdv_48_to_8(float out8k[], float in48k[], int n)\r
+{\r
+    int i,j;\r
+\r
+    for(i=0; i<n; i++) {\r
+        out8k[i] = 0.0;\r
+        for(j=0; j<FDMDV_OS_TAPS; j++)\r
+            out8k[i] += fdmdv_os_filter[j]*in48k[i*FDMDV_OS-j];\r
+    }\r
+}\r
+\r
+\r
diff --git a/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.h b/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.h
new file mode 100644 (file)
index 0000000..630f072
--- /dev/null
@@ -0,0 +1,118 @@
+/*---------------------------------------------------------------------------*\
+                                                                             
+  FILE........: fdmdv.h
+  AUTHOR......: David Rowe
+  DATE CREATED: April 14 2012
+  MODIFIED....: David Witten  
+  ............: 21 May 2011                                                     
+                                                                             
+  A 1400 bit/s Frequency Division Multiplexed Digital Voice (FDMDV)
+  modem.  Used for digital audio over HF SSB. See README_fdmdv.txt for
+  more information, and fdmdv_demo.c, fdmdv_mod.c and fdmdv_demod.c
+  for example usage.
+                     
+  Wrapper header for the Codec2 codec and fdmdv modem APIs.
+
+  References:
+    [1] http://n1su.com/fdmdv/FDMDV_Docs_Rel_1_4b.pdf
+
+\*---------------------------------------------------------------------------*/
+#include "kiss_fft.h"
+
+/*
+  Copyright (C) 2012 David Rowe
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 2.1, as
+  published by the Free Software Foundation.  This program is
+  distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+// The following ifdef block is the standard way of creating macros which make exporting 
+// from a DLL simpler. All files within this DLL are compiled with the WIN32PROJECT_EXPORTS
+// symbol defined on the command line. This symbol should not be defined on any project
+// that uses this DLL. This way any other project whose source files include this file see 
+// WIN32PROJECT_API functions as being imported from a DLL, whereas this DLL sees symbols
+// defined with this macro as being exported.
+#ifdef WIN32PROJECT_EXPORTS
+#define WIN32PROJECT_API __declspec(dllexport)
+#else
+#define WIN32PROJECT_API __declspec(dllimport)
+#endif
+
+/*
+// This class is exported from the win32-project.dll
+class WIN32PROJECT_API Cwin32project 
+{
+public:
+    Cwin32project(void);
+};
+
+extern WIN32PROJECT_API int nwin32project;
+
+WIN32PROJECT_API int fnwin32project(void);
+*/
+
+#ifndef __FDMDV__
+#define __FDMDV__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "comp.h"
+
+WIN32PROJECT_API void fft(float x[], int n, int isign);
+
+
+#define FDMDV_BITS_PER_FRAME          28  /* 20ms frames, 1400 bit/s                                        */
+#define FDMDV_NOM_SAMPLES_PER_FRAME  160  /* modulator output samples/frame and nominal demod samples/frame */
+                                          /* at 8000 Hz sample rate                                         */
+#define FDMDV_MAX_SAMPLES_PER_FRAME  200  /* max demod samples/frame, use this to allocate storage          */
+#define FDMDV_SCALE                 1000  /* suggested scaling for 16 bit shorts                            */
+#define FDMDV_NSYM                    15
+
+/* 8 to 48 kHz sample rate conversion */
+
+#define FDMDV_OS                 6         /* oversampling rate           */
+#define FDMDV_OS_TAPS           48         /* number of OS filter taps    */
+
+/* FDMDV states and stats structures */
+
+struct FDMDV;
+    
+struct FDMDV_STATS {
+    float  snr_est;                /* estimated SNR of rx signal in dB (3 kHz noise BW)  */
+    COMP   rx_symbols[FDMDV_NSYM]; /* latest received symbols, for scatter plot          */ 
+    int    fest_coarse_fine;       /* freq est state, 0-coarse 1-fine                    */ 
+    float  foff;                   /* estimated freq offset in Hz                        */       
+    float  rx_timing;              /* estimated optimum timing offset in samples         */
+    float  clock_offset;           /* Estimated tx/rx sample clock offset in ppm         */
+};
+
+WIN32PROJECT_API struct FDMDV *fdmdv_create(void);
+WIN32PROJECT_API void fdmdv_destroy(struct FDMDV *fdmdv_state);
+    
+WIN32PROJECT_API void fdmdv_mod(struct FDMDV *fdmdv_state, COMP tx_fdm[], int tx_bits[], int *sync_bit);
+WIN32PROJECT_API void fdmdv_demod(struct FDMDV *fdmdv_state, int rx_bits[], int *sync_bit, float rx_fdm[], int *nin);
+    
+WIN32PROJECT_API void fdmdv_get_test_bits(struct FDMDV *fdmdv_state, int tx_bits[]);
+WIN32PROJECT_API void fdmdv_put_test_bits(struct FDMDV *f, int *sync, int *bit_errors, int *ntest_bits, int rx_bits[]);
+    
+WIN32PROJECT_API void fdmdv_get_demod_stats(struct FDMDV *fdmdv_state, struct FDMDV_STATS *fdmdv_stats);
+WIN32PROJECT_API void fdmdv_get_waterfall_line(struct FDMDV *fdmdv_state, float magnitudes[], int *magnitude_points);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.rc b/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.rc
new file mode 100644 (file)
index 0000000..0d7c7a7
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.rc differ
diff --git a/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.sln b/fdmdv2/variants/fdmdv2dll/fdmdv2-dll.sln
new file mode 100644 (file)
index 0000000..554e3c0
--- /dev/null
@@ -0,0 +1,42 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2010\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fdmdv2-dll", "fdmdv2-project.vcxproj", "{25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}"\r
+EndProject\r
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "vbTest", "vbTest\vbTest.vbproj", "{36C01EFE-7F22-486B-82C4-07DF02101B1A}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Mixed Platforms = Debug|Mixed Platforms\r
+               Debug|Win32 = Debug|Win32\r
+               Debug|x86 = Debug|x86\r
+               Release|Mixed Platforms = Release|Mixed Platforms\r
+               Release|Win32 = Release|Win32\r
+               Release|x86 = Release|x86\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Debug|Win32.Build.0 = Debug|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Debug|x86.ActiveCfg = Debug|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Release|Mixed Platforms.ActiveCfg = Release|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Release|Mixed Platforms.Build.0 = Release|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Release|Win32.ActiveCfg = Release|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Release|Win32.Build.0 = Release|Win32\r
+               {25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}.Release|x86.ActiveCfg = Release|Win32\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Debug|Mixed Platforms.Build.0 = Debug|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Debug|Win32.ActiveCfg = Debug|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Debug|x86.ActiveCfg = Debug|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Debug|x86.Build.0 = Debug|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Release|Mixed Platforms.ActiveCfg = Release|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Release|Mixed Platforms.Build.0 = Release|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Release|Win32.ActiveCfg = Release|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Release|x86.ActiveCfg = Release|x86\r
+               {36C01EFE-7F22-486B-82C4-07DF02101B1A}.Release|x86.Build.0 = Release|x86\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/fdmdv2/variants/fdmdv2dll/fdmdv2-project.sdf b/fdmdv2/variants/fdmdv2dll/fdmdv2-project.sdf
new file mode 100644 (file)
index 0000000..0057a1c
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/fdmdv2-project.sdf differ
diff --git a/fdmdv2/variants/fdmdv2dll/fdmdv2-project.vcxproj b/fdmdv2/variants/fdmdv2dll/fdmdv2-project.vcxproj
new file mode 100644 (file)
index 0000000..76e18b3
--- /dev/null
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{25ED31A8-B64D-47A6-A8EA-9B6E3BCDD541}</ProjectGuid>\r
+    <Keyword>Win32Proj</Keyword>\r
+    <RootNamespace>win32project</RootNamespace>\r
+    <ProjectName>fdmdv2-dll</ProjectName>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WIN32PROJECT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WIN32PROJECT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>..\..\codec2-dev\src</AdditionalIncludeDirectories>\r
+      <DisableSpecificWarnings>4305;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
+      <CompileAsManaged>false</CompileAsManaged>\r
+      <ExceptionHandling>Sync</ExceptionHandling>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+    </Link>\r
+    <Manifest>\r
+      <GenerateCatalogFiles>true</GenerateCatalogFiles>\r
+    </Manifest>\r
+  </ItemDefinitionGroup>\r
+  <ItemGroup>\r
+    <None Include="ReadMe.txt" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\..\codec2-dev\src\codec2.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\comp.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\defines.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\fdmdv_internal.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\fft.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\kiss_fft.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\lpc.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\lsp.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\nlp.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\phase.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\postfilter.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\quantise.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\rn.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\sine.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\test_bits.h" />\r
+    <ClInclude Include="..\..\codec2-dev\src\_kiss_fft_guts.h" />\r
+    <ClInclude Include="fdmdv2-dll.h" />\r
+    <ClInclude Include="resource.h" />\r
+    <ClInclude Include="stdafx.h" />\r
+    <ClInclude Include="targetver.h" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\..\codec2-dev\src\codebook.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codebookd.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codebookdt.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codebookge.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codebookjnd.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codebookjvm.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codebookres.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codebookvq.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\codec2.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\fft.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\interp.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\kiss_fft.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\lpc.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\lsp.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\nlp.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\pack.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\phase.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\postfilter.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\quantise.c" />\r
+    <ClCompile Include="..\..\codec2-dev\src\sine.c" />\r
+    <ClCompile Include="fdmdv2-dll.cpp" />\r
+    <ClCompile Include="dllmain.cpp" />\r
+    <ClCompile Include="stdafx.cpp">\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>\r
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ResourceCompile Include="fdmdv2-dll.rc" />\r
+  </ItemGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/fdmdv2/variants/fdmdv2dll/resource.h b/fdmdv2/variants/fdmdv2dll/resource.h
new file mode 100644 (file)
index 0000000..013e3a4
--- /dev/null
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}\r
+// Microsoft Visual C++ generated include file.\r
+// Used by fdmdv2-dll.rc\r
+\r
+// Next default values for new objects\r
+// \r
+#ifdef APSTUDIO_INVOKED\r
+#ifndef APSTUDIO_READONLY_SYMBOLS\r
+#define _APS_NEXT_RESOURCE_VALUE        101\r
+#define _APS_NEXT_COMMAND_VALUE         40001\r
+#define _APS_NEXT_CONTROL_VALUE         1001\r
+#define _APS_NEXT_SYMED_VALUE           101\r
+#endif\r
+#endif\r
diff --git a/fdmdv2/variants/fdmdv2dll/stdafx.cpp b/fdmdv2/variants/fdmdv2dll/stdafx.cpp
new file mode 100644 (file)
index 0000000..c47a01c
--- /dev/null
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes\r
+// win32-project.pch will be the pre-compiled header\r
+// stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+// TODO: reference any additional headers you need in STDAFX.H\r
+// and not in this file\r
diff --git a/fdmdv2/variants/fdmdv2dll/stdafx.h b/fdmdv2/variants/fdmdv2dll/stdafx.h
new file mode 100644 (file)
index 0000000..3ad2c6d
--- /dev/null
@@ -0,0 +1,16 @@
+// stdafx.h : include file for standard system include files,\r
+// or project specific include files that are used frequently, but\r
+// are changed infrequently\r
+//\r
+\r
+#pragma once\r
+\r
+#include "targetver.h"\r
+\r
+#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers\r
+// Windows Header Files:\r
+#include <windows.h>\r
+\r
+static inline double round(double val);\r
+\r
+// TODO: reference additional headers your program requires here\r
diff --git a/fdmdv2/variants/fdmdv2dll/targetver.h b/fdmdv2/variants/fdmdv2dll/targetver.h
new file mode 100644 (file)
index 0000000..90e767b
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once\r
+\r
+// Including SDKDDKVer.h defines the highest available Windows platform.\r
+\r
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and\r
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.\r
+\r
+#include <SDKDDKVer.h>\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/App.config b/fdmdv2/variants/fdmdv2dll/vbTest/App.config
new file mode 100644 (file)
index 0000000..b93bf40
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<configuration>\r
+    <startup>\r
+        <supportedRuntime version="v2.0.50727" />\r
+    </startup>\r
+</configuration>
\ No newline at end of file
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/Form1.Designer.vb b/fdmdv2/variants/fdmdv2dll/vbTest/Form1.Designer.vb
new file mode 100644 (file)
index 0000000..dc510d0
--- /dev/null
@@ -0,0 +1,125 @@
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _\r
+'Declare Sub fdmdv2-dll Lib "\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\Release\fdmdv2-dll.dll" (ByVal Client As String, ByVal Dll As String)\r
+Partial Class Form1\r
+    Inherits System.Windows.Forms.Form\r
+\r
+    'Form overrides dispose to clean up the component list.\r
+    <System.Diagnostics.DebuggerNonUserCode()> _\r
+    Protected Overrides Sub Dispose(ByVal disposing As Boolean)\r
+        Try\r
+            If disposing AndAlso components IsNot Nothing Then\r
+                components.Dispose()\r
+            End If\r
+        Finally\r
+            MyBase.Dispose(disposing)\r
+        End Try\r
+    End Sub\r
+\r
+    'Required by the Windows Form Designer\r
+    Private components As System.ComponentModel.IContainer\r
+\r
+    'NOTE: The following procedure is required by the Windows Form Designer\r
+    'It can be modified using the Windows Form Designer.  \r
+    'Do not modify it using the code editor.\r
+    <System.Diagnostics.DebuggerStepThrough()> _\r
+    Private Sub InitializeComponent()\r
+Me.TextBox1 = New System.Windows.Forms.TextBox()\r
+Me.GroupBox1 = New System.Windows.Forms.GroupBox()\r
+Me.Button1 = New System.Windows.Forms.Button()\r
+Me.Button2 = New System.Windows.Forms.Button()\r
+Me.Button3 = New System.Windows.Forms.Button()\r
+Me.Button4 = New System.Windows.Forms.Button()\r
+Me.Button5 = New System.Windows.Forms.Button()\r
+Me.GroupBox1.SuspendLayout()\r
+Me.SuspendLayout()\r
+'\r
+'TextBox1\r
+'\r
+Me.TextBox1.Location = New System.Drawing.Point(183, 2)\r
+Me.TextBox1.Multiline = True\r
+Me.TextBox1.Name = "TextBox1"\r
+Me.TextBox1.Size = New System.Drawing.Size(384, 395)\r
+Me.TextBox1.TabIndex = 0\r
+'\r
+'GroupBox1\r
+'\r
+Me.GroupBox1.Controls.Add(Me.Button4)\r
+Me.GroupBox1.Controls.Add(Me.Button3)\r
+Me.GroupBox1.Controls.Add(Me.Button2)\r
+Me.GroupBox1.Controls.Add(Me.Button1)\r
+Me.GroupBox1.Location = New System.Drawing.Point(10, 10)\r
+Me.GroupBox1.Name = "GroupBox1"\r
+Me.GroupBox1.Size = New System.Drawing.Size(167, 337)\r
+Me.GroupBox1.TabIndex = 1\r
+Me.GroupBox1.TabStop = False\r
+Me.GroupBox1.Text = "Test FDMDV2"\r
+'\r
+'Button1\r
+'\r
+Me.Button1.Location = New System.Drawing.Point(17, 31)\r
+Me.Button1.Name = "Button1"\r
+Me.Button1.Size = New System.Drawing.Size(135, 24)\r
+Me.Button1.TabIndex = 0\r
+Me.Button1.Text = "Load"\r
+Me.Button1.UseVisualStyleBackColor = True\r
+'\r
+'Button2\r
+'\r
+Me.Button2.Location = New System.Drawing.Point(17, 61)\r
+Me.Button2.Name = "Button2"\r
+Me.Button2.Size = New System.Drawing.Size(135, 27)\r
+Me.Button2.TabIndex = 1\r
+Me.Button2.Text = "Start"\r
+Me.Button2.UseVisualStyleBackColor = True\r
+'\r
+'Button3\r
+'\r
+Me.Button3.Location = New System.Drawing.Point(17, 94)\r
+Me.Button3.Name = "Button3"\r
+Me.Button3.Size = New System.Drawing.Size(135, 24)\r
+Me.Button3.TabIndex = 2\r
+Me.Button3.Text = "Stop"\r
+Me.Button3.UseVisualStyleBackColor = True\r
+'\r
+'Button4\r
+'\r
+Me.Button4.Location = New System.Drawing.Point(17, 124)\r
+Me.Button4.Name = "Button4"\r
+Me.Button4.Size = New System.Drawing.Size(135, 24)\r
+Me.Button4.TabIndex = 3\r
+Me.Button4.Text = "Unload"\r
+Me.Button4.UseVisualStyleBackColor = True\r
+'\r
+'Button5\r
+'\r
+Me.Button5.Location = New System.Drawing.Point(27, 356)\r
+Me.Button5.Name = "Button5"\r
+Me.Button5.Size = New System.Drawing.Size(135, 24)\r
+Me.Button5.TabIndex = 2\r
+Me.Button5.Text = "Quit"\r
+Me.Button5.UseVisualStyleBackColor = True\r
+'\r
+'Form1\r
+'\r
+Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)\r
+Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font\r
+Me.ClientSize = New System.Drawing.Size(568, 392)\r
+Me.Controls.Add(Me.Button5)\r
+Me.Controls.Add(Me.GroupBox1)\r
+Me.Controls.Add(Me.TextBox1)\r
+Me.Name = "Form1"\r
+Me.Text = "Test FDMDV2.dll"\r
+Me.GroupBox1.ResumeLayout(False)\r
+Me.ResumeLayout(False)\r
+Me.PerformLayout()\r
+\r
+End Sub\r
+    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox\r
+    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox\r
+    Friend WithEvents Button4 As System.Windows.Forms.Button\r
+    Friend WithEvents Button3 As System.Windows.Forms.Button\r
+    Friend WithEvents Button2 As System.Windows.Forms.Button\r
+    Friend WithEvents Button1 As System.Windows.Forms.Button\r
+    Friend WithEvents Button5 As System.Windows.Forms.Button\r
+\r
+End Class\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/Form1.resx b/fdmdv2/variants/fdmdv2dll/vbTest/Form1.resx
new file mode 100644 (file)
index 0000000..5ea0895
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+</root>
\ No newline at end of file
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/Form1.vb b/fdmdv2/variants/fdmdv2dll/vbTest/Form1.vb
new file mode 100644 (file)
index 0000000..c07edc4
--- /dev/null
@@ -0,0 +1,3 @@
+Public Class Form1\r
+\r
+End Class\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Application.Designer.vb b/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Application.Designer.vb
new file mode 100644 (file)
index 0000000..da97349
--- /dev/null
@@ -0,0 +1,38 @@
+'------------------------------------------------------------------------------\r
+' <auto-generated>\r
+'     This code was generated by a tool.\r
+'     Runtime Version:4.0.30319.269\r
+'\r
+'     Changes to this file may cause incorrect behavior and will be lost if\r
+'     the code is regenerated.\r
+' </auto-generated>\r
+'------------------------------------------------------------------------------\r
+\r
+Option Strict On\r
+Option Explicit On\r
+\r
+\r
+Namespace My\r
+    \r
+    'NOTE: This file is auto-generated; do not modify it directly.  To make changes,\r
+    ' or if you encounter build errors in this file, go to the Project Designer\r
+    ' (go to Project Properties or double-click the My Project node in\r
+    ' Solution Explorer), and make changes on the Application tab.\r
+    '\r
+    Partial Friend Class MyApplication\r
+        \r
+        <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _\r
+        Public Sub New()\r
+            MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)\r
+            Me.IsSingleInstance = false\r
+            Me.EnableVisualStyles = true\r
+            Me.SaveMySettingsOnExit = true\r
+            Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses\r
+        End Sub\r
+        \r
+        <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _\r
+        Protected Overrides Sub OnCreateMainForm()\r
+            Me.MainForm = Global.vbTest.Form1\r
+        End Sub\r
+    End Class\r
+End Namespace\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Application.myapp b/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Application.myapp
new file mode 100644 (file)
index 0000000..7b0c597
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\r
+  <MySubMain>true</MySubMain>\r
+  <MainForm>Form1</MainForm>\r
+  <SingleInstance>false</SingleInstance>\r
+  <ShutdownMode>0</ShutdownMode>\r
+  <EnableVisualStyles>true</EnableVisualStyles>\r
+  <AuthenticationMode>0</AuthenticationMode>\r
+  <ApplicationType>0</ApplicationType>\r
+  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>\r
+</MyApplicationData>\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/My Project/AssemblyInfo.vb b/fdmdv2/variants/fdmdv2dll/vbTest/My Project/AssemblyInfo.vb
new file mode 100644 (file)
index 0000000..c8fcf7d
--- /dev/null
@@ -0,0 +1,35 @@
+Imports System\r
+Imports System.Reflection\r
+Imports System.Runtime.InteropServices\r
+\r
+' General Information about an assembly is controlled through the following \r
+' set of attributes. Change these attribute values to modify the information\r
+' associated with an assembly.\r
+\r
+' Review the values of the assembly attributes\r
+\r
+<Assembly: AssemblyTitle("vbTest")> \r
+<Assembly: AssemblyDescription("")> \r
+<Assembly: AssemblyCompany("")> \r
+<Assembly: AssemblyProduct("vbTest")> \r
+<Assembly: AssemblyCopyright("Copyright ©  2012")> \r
+<Assembly: AssemblyTrademark("")> \r
+\r
+<Assembly: ComVisible(False)>\r
+\r
+'The following GUID is for the ID of the typelib if this project is exposed to COM\r
+<Assembly: Guid("1d082f87-0843-4f57-b765-09c5a636aab4")> \r
+\r
+' Version information for an assembly consists of the following four values:\r
+'\r
+'      Major Version\r
+'      Minor Version \r
+'      Build Number\r
+'      Revision\r
+'\r
+' You can specify all the values or you can default the Build and Revision Numbers \r
+' by using the '*' as shown below:\r
+' <Assembly: AssemblyVersion("1.0.*")> \r
+\r
+<Assembly: AssemblyVersion("1.0.0.0")> \r
+<Assembly: AssemblyFileVersion("1.0.0.0")> \r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Resources.Designer.vb b/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Resources.Designer.vb
new file mode 100644 (file)
index 0000000..32308cb
--- /dev/null
@@ -0,0 +1,62 @@
+'------------------------------------------------------------------------------\r
+' <auto-generated>\r
+'     This code was generated by a tool.\r
+'     Runtime Version:4.0.30319.269\r
+'\r
+'     Changes to this file may cause incorrect behavior and will be lost if\r
+'     the code is regenerated.\r
+' </auto-generated>\r
+'------------------------------------------------------------------------------\r
+\r
+Option Strict On\r
+Option Explicit On\r
+\r
+\r
+Namespace My.Resources\r
+    \r
+    'This class was auto-generated by the StronglyTypedResourceBuilder\r
+    'class via a tool like ResGen or Visual Studio.\r
+    'To add or remove a member, edit your .ResX file then rerun ResGen\r
+    'with the /str option, or rebuild your VS project.\r
+    '''<summary>\r
+    '''  A strongly-typed resource class, for looking up localized strings, etc.\r
+    '''</summary>\r
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _\r
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _\r
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _\r
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _\r
+    Friend Module Resources\r
+\r
+        Private resourceMan As Global.System.Resources.ResourceManager\r
+\r
+        Private resourceCulture As Global.System.Globalization.CultureInfo\r
+\r
+        '''<summary>\r
+        '''  Returns the cached ResourceManager instance used by this class.\r
+        '''</summary>\r
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _\r
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager\r
+            Get\r
+                If Object.ReferenceEquals(resourceMan, Nothing) Then\r
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("vbTest.Resources", GetType(Resources).Assembly)\r
+                    resourceMan = temp\r
+                End If\r
+                Return resourceMan\r
+            End Get\r
+        End Property\r
+\r
+        '''<summary>\r
+        '''  Overrides the current thread's CurrentUICulture property for all\r
+        '''  resource lookups using this strongly typed resource class.\r
+        '''</summary>\r
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _\r
+        Friend Property Culture() As Global.System.Globalization.CultureInfo\r
+            Get\r
+                Return resourceCulture\r
+            End Get\r
+            Set(ByVal value As Global.System.Globalization.CultureInfo)\r
+                resourceCulture = value\r
+            End Set\r
+        End Property\r
+    End Module\r
+End Namespace\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Resources.resx b/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Resources.resx
new file mode 100644 (file)
index 0000000..ffecec8
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+</root>
\ No newline at end of file
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Settings.Designer.vb b/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Settings.Designer.vb
new file mode 100644 (file)
index 0000000..82bd1eb
--- /dev/null
@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------\r
+' <auto-generated>\r
+'     This code was generated by a tool.\r
+'     Runtime Version:4.0.30319.269\r
+'\r
+'     Changes to this file may cause incorrect behavior and will be lost if\r
+'     the code is regenerated.\r
+' </auto-generated>\r
+'------------------------------------------------------------------------------\r
+\r
+Option Strict On\r
+Option Explicit On\r
+\r
+\r
+Namespace My\r
+\r
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _\r
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _\r
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _\r
+    Partial Friend NotInheritable Class MySettings\r
+        Inherits Global.System.Configuration.ApplicationSettingsBase\r
+\r
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)\r
+\r
+#Region "My.Settings Auto-Save Functionality"\r
+#If _MyType = "WindowsForms" Then\r
+        Private Shared addedHandler As Boolean\r
+\r
+        Private Shared addedHandlerLockObject As New Object\r
+\r
+        <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _\r
+        Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)\r
+            If My.Application.SaveMySettingsOnExit Then\r
+                My.Settings.Save()\r
+            End If\r
+        End Sub\r
+#End If\r
+#End Region\r
+\r
+        Public Shared ReadOnly Property [Default]() As MySettings\r
+            Get\r
+\r
+#If _MyType = "WindowsForms" Then\r
+                   If Not addedHandler Then\r
+                        SyncLock addedHandlerLockObject\r
+                            If Not addedHandler Then\r
+                                AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings\r
+                                addedHandler = True\r
+                            End If\r
+                        End SyncLock\r
+                    End If\r
+#End If\r
+                Return defaultInstance\r
+            End Get\r
+        End Property\r
+    End Class\r
+End Namespace\r
+\r
+Namespace My\r
+    \r
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _\r
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _\r
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _\r
+    Friend Module MySettingsProperty\r
+        \r
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _\r
+        Friend ReadOnly Property Settings() As Global.vbTest.My.MySettings\r
+            Get\r
+                Return Global.vbTest.My.MySettings.Default\r
+            End Get\r
+        End Property\r
+    End Module\r
+End Namespace\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Settings.settings b/fdmdv2/variants/fdmdv2dll/vbTest/My Project/Settings.settings
new file mode 100644 (file)
index 0000000..377f56d
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>\r
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">\r
+  <Profiles>\r
+    <Profile Name="(Default)" />\r
+  </Profiles>\r
+  <Settings />\r
+</SettingsFile>\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/bin/Debug/.gitignore b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Debug/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.exe b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.exe
new file mode 100644 (file)
index 0000000..aa11582
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.exe differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.pdb b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.pdb
new file mode 100644 (file)
index 0000000..20d166d
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.pdb differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.vshost.exe b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.vshost.exe
new file mode 100644 (file)
index 0000000..58da521
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.vshost.exe differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.vshost.exe.manifest b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.vshost.exe.manifest
new file mode 100644 (file)
index 0000000..f96b1d6
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">\r
+  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>\r
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">\r
+    <security>\r
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">\r
+        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>\r
+      </requestedPrivileges>\r
+    </security>\r
+  </trustInfo>\r
+</assembly>\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.xml b/fdmdv2/variants/fdmdv2dll/vbTest/bin/Release/vbTest.xml
new file mode 100644 (file)
index 0000000..38eaa1c
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>\r
+<doc>\r
+<assembly>\r
+<name>\r
+vbTest\r
+</name>\r
+</assembly>\r
+<members>\r
+<member name="P:vbTest.My.Resources.Resources.ResourceManager">\r
+       <summary>\r
+  Returns the cached ResourceManager instance used by this class.\r
+</summary>\r
+</member><member name="P:vbTest.My.Resources.Resources.Culture">\r
+       <summary>\r
+  Overrides the current thread's CurrentUICulture property for all\r
+  resource lookups using this strongly typed resource class.\r
+</summary>\r
+</member><member name="T:vbTest.My.Resources.Resources">\r
+       <summary>\r
+  A strongly-typed resource class, for looking up localized strings, etc.\r
+</summary>\r
+</member>\r
+</members>\r
+</doc>
\ No newline at end of file
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Debug/.gitignore b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Debug/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache
new file mode 100644 (file)
index 0000000..0699be2
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.read.1.tlog b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.read.1.tlog
new file mode 100644 (file)
index 0000000..49b0276
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.read.1.tlog differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.write.1.tlog b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.write.1.tlog
new file mode 100644 (file)
index 0000000..9793cab
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/GenerateResource-ResGen.write.1.tlog differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/TempPE/My Project.Resources.Designer.vb.dll b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/TempPE/My Project.Resources.Designer.vb.dll
new file mode 100644 (file)
index 0000000..7b15555
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/TempPE/My Project.Resources.Designer.vb.dll differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Form1.resources b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Form1.resources
new file mode 100644 (file)
index 0000000..06c24d0
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Form1.resources differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Resources.resources b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Resources.resources
new file mode 100644 (file)
index 0000000..06c24d0
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.Resources.resources differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.exe b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.exe
new file mode 100644 (file)
index 0000000..aa11582
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.exe differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.pdb b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.pdb
new file mode 100644 (file)
index 0000000..20d166d
Binary files /dev/null and b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.pdb differ
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.vbproj.FileListAbsolute.txt b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.vbproj.FileListAbsolute.txt
new file mode 100644 (file)
index 0000000..a79bdde
--- /dev/null
@@ -0,0 +1,11 @@
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\bin\Release\vbTest.exe\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\bin\Release\vbTest.pdb\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\bin\Release\vbTest.xml\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\ResolveAssemblyReference.cache\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\vbTest.Form1.resources\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\vbTest.Resources.resources\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\GenerateResource-ResGen.read.1.tlog\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\GenerateResource-ResGen.write.1.tlog\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\vbTest.exe\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\vbTest.xml\r
+C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2dll\vbTest\obj\x86\Release\vbTest.pdb\r
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.xml b/fdmdv2/variants/fdmdv2dll/vbTest/obj/x86/Release/vbTest.xml
new file mode 100644 (file)
index 0000000..38eaa1c
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>\r
+<doc>\r
+<assembly>\r
+<name>\r
+vbTest\r
+</name>\r
+</assembly>\r
+<members>\r
+<member name="P:vbTest.My.Resources.Resources.ResourceManager">\r
+       <summary>\r
+  Returns the cached ResourceManager instance used by this class.\r
+</summary>\r
+</member><member name="P:vbTest.My.Resources.Resources.Culture">\r
+       <summary>\r
+  Overrides the current thread's CurrentUICulture property for all\r
+  resource lookups using this strongly typed resource class.\r
+</summary>\r
+</member><member name="T:vbTest.My.Resources.Resources">\r
+       <summary>\r
+  A strongly-typed resource class, for looking up localized strings, etc.\r
+</summary>\r
+</member>\r
+</members>\r
+</doc>
\ No newline at end of file
diff --git a/fdmdv2/variants/fdmdv2dll/vbTest/vbTest.vbproj b/fdmdv2/variants/fdmdv2dll/vbTest/vbTest.vbproj
new file mode 100644 (file)
index 0000000..f8e31f0
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>\r
+    <ProductVersion>\r
+    </ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{36C01EFE-7F22-486B-82C4-07DF02101B1A}</ProjectGuid>\r
+    <OutputType>WinExe</OutputType>\r
+    <StartupObject>vbTest.My.MyApplication</StartupObject>\r
+    <RootNamespace>vbTest</RootNamespace>\r
+    <AssemblyName>vbTest</AssemblyName>\r
+    <FileAlignment>512</FileAlignment>\r
+    <MyType>WindowsForms</MyType>\r
+    <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <DefineDebug>true</DefineDebug>\r
+    <DefineTrace>true</DefineTrace>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DocumentationFile>vbTest.xml</DocumentationFile>\r
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <DebugType>pdbonly</DebugType>\r
+    <DefineDebug>false</DefineDebug>\r
+    <DefineTrace>true</DefineTrace>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DocumentationFile>vbTest.xml</DocumentationFile>\r
+    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <OptionExplicit>On</OptionExplicit>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <OptionCompare>Binary</OptionCompare>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <OptionStrict>Off</OptionStrict>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <OptionInfer>On</OptionInfer>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <ApplicationIcon>acrobat70.ico</ApplicationIcon>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Deployment" />\r
+    <Reference Include="System.Drawing" />\r
+    <Reference Include="System.Windows.Forms" />\r
+    <Reference Include="System.Xml" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Import Include="Microsoft.VisualBasic" />\r
+    <Import Include="System" />\r
+    <Import Include="System.Collections" />\r
+    <Import Include="System.Collections.Generic" />\r
+    <Import Include="System.Data" />\r
+    <Import Include="System.Drawing" />\r
+    <Import Include="System.Diagnostics" />\r
+    <Import Include="System.Windows.Forms" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="Form1.vb">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="Form1.Designer.vb">\r
+      <DependentUpon>Form1.vb</DependentUpon>\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="My Project\AssemblyInfo.vb" />\r
+    <Compile Include="My Project\Application.Designer.vb">\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Application.myapp</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="My Project\Resources.Designer.vb">\r
+      <AutoGen>True</AutoGen>\r
+      <DesignTime>True</DesignTime>\r
+      <DependentUpon>Resources.resx</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="My Project\Settings.Designer.vb">\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Settings.settings</DependentUpon>\r
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <EmbeddedResource Include="Form1.resx">\r
+      <DependentUpon>Form1.vb</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="My Project\Resources.resx">\r
+      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>\r
+      <LastGenOutput>Resources.Designer.vb</LastGenOutput>\r
+      <CustomToolNamespace>My.Resources</CustomToolNamespace>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="My Project\Application.myapp">\r
+      <Generator>MyApplicationCodeGenerator</Generator>\r
+      <LastGenOutput>Application.Designer.vb</LastGenOutput>\r
+    </None>\r
+    <None Include="My Project\Settings.settings">\r
+      <Generator>SettingsSingleFileGenerator</Generator>\r
+      <CustomToolNamespace>My</CustomToolNamespace>\r
+      <LastGenOutput>Settings.Designer.vb</LastGenOutput>\r
+    </None>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Content Include="acrobat70.ico" />\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+</Project>
\ No newline at end of file