Commit 8a7ab8db authored by sletz's avatar sletz
Browse files

Compiles again on Windows.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4667 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 5257b1d1
......@@ -44,8 +44,11 @@ static HMODULE libjack_handle = 0;
#else
static void *libjack_handle = 0;
#endif
#ifndef WIN32
static void __attribute__((constructor)) tryload_libjack()
#else
void tryload_libjack()
#endif
{
if (getenv("SKIP_LIBJACK") == 0) { // just in case libjack is causing troubles..
#ifdef __APPLE__
......
......@@ -75,7 +75,7 @@
#include "netjack_packet.h"
#include "JackError.h"
#ifdef NO_JACK_ERROR
#ifdef NO_JACK_ERROR
#define jack_error printf
#endif
......
......@@ -17,7 +17,7 @@
*/
#include "JackError.h"
#include "JackNetWinSocket.h"
namespace Jack
......
......@@ -21,9 +21,6 @@
#include "JackError.h"
namespace Jack
{
class JackBaseWinMutex
{
bool JackBaseWinMutex::Lock()
......
......@@ -21,7 +21,7 @@
#ifndef __JackWinMutex__
#define __JackWinMutex__
#include "JackCompilerDeps.h"
#include "JackException.h"
#include <windows.h>
......@@ -31,7 +31,7 @@ namespace Jack
/*!
\brief Mutex abstraction.
*/
class JackBaseWinMutex
class SERVER_EXPORT JackBaseWinMutex
{
protected:
......@@ -56,10 +56,10 @@ class JackBaseWinMutex
bool Lock();
bool Trylock();
bool Unlock();
};
class JackWinMutex
class SERVER_EXPORT JackWinMutex
{
protected:
......
......@@ -8,12 +8,13 @@
<Build>
<Target title="Win32 Release 64bits">
<Option output="Release64\bin\jack_netsource" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64\" />
<Option object_output="Release64\netsource" />
<Option type="1" />
<Option compiler="mingw_64" />
<Compiler>
<Add option="-O2" />
<Add option="-Wall" />
<Add option="-DNO_JACK_ERROR" />
<Add directory="..\example-clients" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -27,12 +28,13 @@
</Target>
<Target title="Win32 Debug 64bits">
<Option output="Debug64\bin\jack_netsource" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug64\" />
<Option object_output="Debug64\netsource" />
<Option type="1" />
<Option compiler="mingw_64" />
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-DNO_JACK_ERROR" />
<Add directory="..\example-clients" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -46,13 +48,14 @@
</Target>
<Target title="Win32 Profiling 64bits">
<Option output="Release64\bin\jack_netsource" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64\" />
<Option object_output="Release64\netsource" />
<Option type="1" />
<Option compiler="mingw_64" />
<Compiler>
<Add option="-O2" />
<Add option="-Wall" />
<Add option="-DJACK_MONITOR" />
<Add option="-DNO_JACK_ERROR" />
<Add directory="..\example-clients" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -66,13 +69,14 @@
</Target>
<Target title="Win32 Release 32bits">
<Option output="Release\bin\jack_netsource" prefix_auto="1" extension_auto="1" />
<Option object_output="Release\" />
<Option object_output="Release\netsource" />
<Option type="1" />
<Option compiler="mingw_64" />
<Compiler>
<Add option="-O2" />
<Add option="-Wall" />
<Add option="-m32" />
<Add option="-DNO_JACK_ERROR" />
<Add directory="..\example-clients" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -87,13 +91,14 @@
</Target>
<Target title="Win32 Debug 32bits">
<Option output="Debug\bin\jack_netsource" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug\" />
<Option object_output="Debug\netsource" />
<Option type="1" />
<Option compiler="mingw_64" />
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-m32" />
<Add option="-DNO_JACK_ERROR" />
<Add directory="..\example-clients" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -108,7 +113,7 @@
</Target>
<Target title="Win32 Profiling 32bits">
<Option output="Release\bin\jack_netsource" prefix_auto="1" extension_auto="1" />
<Option object_output="Release\" />
<Option object_output="Release\netsource" />
<Option type="1" />
<Option compiler="mingw_64" />
<Compiler>
......@@ -116,6 +121,7 @@
<Add option="-Wall" />
<Add option="-m32" />
<Add option="-DJACK_MONITOR" />
<Add option="-DNO_JACK_ERROR" />
<Add directory="..\example-clients" />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="jack">
<Project filename="libjackserver.cbp" />
<Project filename="libjack.cbp" />
<Project filename="libjacknet.cbp" />
<Project filename="libjackserver.cbp" active="1" />
<Project filename="jack_portaudio.cbp" />
<Project filename="jack_netdriver.cbp" active="1" />
<Project filename="jack_netdriver.cbp" />
<Project filename="jack_netonedriver.cbp" />
<Project filename="jack_dummy.cbp" />
<Project filename="jack_netmanager.cbp" />
<Project filename="jack_audioadapter.cbp" />
<Project filename="libjack.cbp" />
<Project filename="jack_load.cbp" />
<Project filename="jack_unload.cbp" />
<Project filename="jack_lsp.cbp" />
......@@ -24,7 +25,6 @@
<Project filename="jack_midi_latency_test.cbp" />
<Project filename="jack_netadapter.cbp" />
<Project filename="jack_netsource.cbp" />
<Project filename="libjacknet.cbp" />
<Project filename="jack_midi_dump.cbp" />
</Workspace>
</CodeBlocks_workspace_file>
......@@ -8,7 +8,7 @@
<Build>
<Target title="Win32 Release 64bits">
<Option output="Release64\bin\libjack64" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64" />
<Option object_output="Release64\libjack" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -51,7 +51,7 @@
</Target>
<Target title="Win32 Debug 64bits">
<Option output="Debug64\bin\libjack64" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug64" />
<Option object_output="Debug64\libjack" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -94,7 +94,7 @@
</Target>
<Target title="Win32 Profiling 64bits">
<Option output="Release64\bin\libjack64" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64" />
<Option object_output="Release64\libjack" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -138,7 +138,7 @@
</Target>
<Target title="Win32 Release 32bits">
<Option output="Release\bin\libjack" prefix_auto="1" extension_auto="1" />
<Option object_output="Release" />
<Option object_output="Release\libjack" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -181,12 +181,12 @@
<Add library="psapi" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Release/libjack.res libjack.rc" />
<Add before="windres -F pe-i386 -O coff -o Release/libjack/libjack.res libjack.rc" />
</ExtraCommands>
</Target>
<Target title="Win32 Debug 32bits">
<Option output="Debug\bin\libjack" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug" />
<Option object_output="Debug\libjack" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -229,12 +229,12 @@
<Add library="psapi" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Debug/libjack.res libjack.rc" />
<Add before="windres -F pe-i386 -O coff -o Debug/libjack/libjack.res libjack.rc" />
</ExtraCommands>
</Target>
<Target title="Win32 Profiling 32bits">
<Option output="Release\bin\libjack" prefix_auto="1" extension_auto="1" />
<Option object_output="Release" />
<Option object_output="Release\libjack" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -278,7 +278,7 @@
<Add library="psapi" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Release/libjack.res libjack.rc" />
<Add before="windres -F pe-i386 -O coff -o Release/libjack/libjack.res libjack.rc" />
</ExtraCommands>
</Target>
</Build>
......@@ -309,7 +309,7 @@
<Option target="Win32 Profiling" />
</Unit>
<Unit filename="..\common\JackError.cpp" />
<Unit filename="..\common\JackException.cpp" />
<Unit filename="..\common\JackException.cpp" />
<Unit filename="..\common\JackFrameTimer.cpp" />
<Unit filename="..\common\JackGlobals.cpp" />
<Unit filename="..\common\JackGraphManager.cpp" />
......@@ -330,13 +330,13 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="JackMMCSS.cpp" />
<Unit filename="JackWinMutex.cpp" />
<Unit filename="JackWinNamedPipe.cpp" />
<Unit filename="JackWinNamedPipeClientChannel.cpp" />
<Unit filename="JackWinProcessSync.cpp" />
<Unit filename="JackWinSemaphore.cpp" />
<Unit filename="JackWinServerLaunch.cpp" />
<Unit filename="JackWinThread.cpp" />
<Unit filename="JackWinMutex.cpp" />
<Unit filename="JackWinTime.c">
<Option compilerVar="CC" />
</Unit>
......
......@@ -8,7 +8,7 @@
<Build>
<Target title="Win32 Release 64bits">
<Option output="Release64\bin\libjacknet" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64" />
<Option object_output="Release64\libjacknet" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
......@@ -25,7 +25,7 @@
<Add option="-DREGEX_MALLOC" />
<Add option="-DSTDC_HEADERS" />
<Add option="-D__SMP__" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_32_64" />
<Add directory="." />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -38,7 +38,7 @@
</Target>
<Target title="Win32 Debug 64bits">
<Option output="Debug64\bin\libjacknet" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug64" />
<Option object_output="Debug64\libjacknet" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
......@@ -55,7 +55,7 @@
<Add option="-DREGEX_MALLOC" />
<Add option="-DSTDC_HEADERS" />
<Add option="-D__SMP__" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_32_64" />
<Add directory="." />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -68,7 +68,7 @@
</Target>
<Target title="Win32 Profiling 64bits">
<Option output="Release64\bin\libjacknet" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64" />
<Option object_output="Release64\libjacknet" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
......@@ -85,7 +85,7 @@
<Add option="-DREGEX_MALLOC" />
<Add option="-DSTDC_HEADERS" />
<Add option="-D__SMP__" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_MONITOR" />
<Add directory="." />
<Add directory="..\windows" />
......@@ -99,7 +99,7 @@
</Target>
<Target title="Win32 Release 32bits">
<Option output="Release\bin\libjacknet" prefix_auto="1" extension_auto="1" />
<Option object_output="Release" />
<Option object_output="Release\libjacknet" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
......@@ -117,7 +117,7 @@
<Add option="-DREGEX_MALLOC" />
<Add option="-DSTDC_HEADERS" />
<Add option="-D__SMP__" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_32_64" />
<Add directory="." />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -129,12 +129,12 @@
<Add directory="Release\bin" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Release/libjacknet.res libjacknet.rc" />
<Add before="windres -F pe-i386 -O coff -o Release/libjacknet/libjacknet.res libjacknet.rc" />
</ExtraCommands>
</Target>
<Target title="Win32 Debug 32bits">
<Option output="Debug\bin\libjacknet" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug" />
<Option object_output="Debug\libjacknet" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
......@@ -152,7 +152,7 @@
<Add option="-DREGEX_MALLOC" />
<Add option="-DSTDC_HEADERS" />
<Add option="-D__SMP__" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_32_64" />
<Add directory="." />
<Add directory="..\windows" />
<Add directory="..\common\jack" />
......@@ -164,12 +164,12 @@
<Add directory="Debug\bin" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Debug/libjacknet.res libjacknet.rc" />
<Add before="windres -F pe-i386 -O coff -o Debug/libjacknet/libjacknet.res libjacknet.rc" />
</ExtraCommands>
</Target>
<Target title="Win32 Profiling 32bits">
<Option output="Release\bin\libjacknet" prefix_auto="1" extension_auto="1" />
<Option object_output="Release" />
<Option object_output="Release\libjacknet" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
......@@ -187,7 +187,7 @@
<Add option="-DREGEX_MALLOC" />
<Add option="-DSTDC_HEADERS" />
<Add option="-D__SMP__" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_32_64" />
<Add option="-DJACK_MONITOR" />
<Add directory="." />
<Add directory="..\windows" />
......@@ -200,7 +200,7 @@
<Add directory="Release\bin" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Release/libjacknet.res libjacknet.rc" />
<Add before="windres -F pe-i386 -O coff -o Release/libjacknet/libjacknet.res libjacknet.rc" />
</ExtraCommands>
</Target>
</Build>
......@@ -226,13 +226,13 @@
<Add library="ws2_32" />
</Linker>
<Unit filename="..\common\JackAudioAdapterInterface.cpp" />
<Unit filename="..\common\JackException.cpp" />
<Unit filename="..\common\JackGlobals.cpp" />
<Unit filename="..\common\JackLibSampleRateResampler.cpp" />
<Unit filename="..\common\JackNetAPI.cpp" />
<Unit filename="..\common\JackNetInterface.cpp" />
<Unit filename="..\common\JackNetTool.cpp" />
<Unit filename="..\common\JackResampler.cpp" />
<Unit filename="..\common\JackException.cpp" />
<Unit filename="..\common\ringbuffer.c">
<Option compilerVar="CC" />
</Unit>
......
......@@ -8,7 +8,7 @@
<Build>
<Target title="Win32 Release 64bits">
<Option output="Release64\bin\libjackserver64" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64" />
<Option object_output="Release64\libjackserver" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -41,7 +41,7 @@
</Target>
<Target title="Win32 Debug 64bits">
<Option output="Debug64\bin\libjackserver64" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug64" />
<Option object_output="Debug64\libjackserver" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -74,7 +74,7 @@
</Target>
<Target title="Win32 Profiling 64bits">
<Option output="Release64\bin\libjackserver64" prefix_auto="1" extension_auto="1" />
<Option object_output="Release64" />
<Option object_output="Release64\libjackserver" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -108,7 +108,7 @@
</Target>
<Target title="Win32 Release 32bits">
<Option output="Release\bin\libjackserver" prefix_auto="1" extension_auto="1" />
<Option object_output="Release" />
<Option object_output="Release\libjackserver" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -141,12 +141,12 @@
<Add directory="Release\bin" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Release/libjackserver.res libjackserver.rc" />
<Add before="windres -F pe-i386 -O coff -o Release/libjackserver/libjackserver.res libjackserver.rc" />
</ExtraCommands>
</Target>
<Target title="Win32 Debug 32bits">
<Option output="Debug\bin\libjackserver" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug" />
<Option object_output="Debug\libjackserver" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -179,12 +179,12 @@
<Add directory="Debug\bin" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Debug/libjackserver.res libjackserver.rc" />
<Add before="windres -F pe-i386 -O coff -o Debug/libjackserver/libjackserver.res libjackserver.rc" />
</ExtraCommands>
</Target>
<Target title="Win32 Profiling 32bits">
<Option output="Release\bin\libjackserver" prefix_auto="1" extension_auto="1" />
<Option object_output="Release" />
<Option object_output="Release\libjackserver" />
<Option type="3" />
<Option compiler="mingw_64" />
<Option createDefFile="1" />
......@@ -218,7 +218,7 @@
<Add directory="Release\bin" />
</Linker>
<ExtraCommands>
<Add before="windres -F pe-i386 -O coff -o Release/libjackserver.res libjackserver.rc" />
<Add before="windres -F pe-i386 -O coff -o Release/libjackserver/libjackserver.res libjackserver.rc" />
</ExtraCommands>
</Target>
</Build>
......@@ -259,7 +259,7 @@
<Option target="Win32 Profiling" />
</Unit>
<Unit filename="..\common\JackError.cpp" />
<Unit filename="..\common\JackException.cpp" />
<Unit filename="..\common\JackException.cpp" />
<Unit filename="..\common\JackExternalClient.cpp" />
<Unit filename="..\common\JackFrameTimer.cpp" />
<Unit filename="..\common\JackFreewheelDriver.cpp" />
......@@ -299,6 +299,7 @@
</Unit>
<Unit filename="JackMMCSS.cpp" />
<Unit filename="JackNetWinSocket.cpp" />
<Unit filename="JackWinMutex.cpp" />
<Unit filename="JackWinNamedPipe.cpp" />
<Unit filename="JackWinNamedPipeClientChannel.cpp" />
<Unit filename="JackWinNamedPipeNotifyChannel.cpp" />
......@@ -307,7 +308,6 @@
<Unit filename="JackWinProcessSync.cpp" />
<Unit filename="JackWinSemaphore.cpp" />
<Unit filename="JackWinThread.cpp" />
<Unit filename="JackWinMutex.cpp" />
<Unit filename="JackWinTime.c">
<Option compilerVar="CC" />
</Unit>
......
......@@ -21,7 +21,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <cmath>
#include "JackEngineControl.h"
#include "JackWinMMEDriver.h"
#include "JackWinMMEDriver.h"
#include "driver_interface.h"
using Jack::JackWinMMEDriver;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment