Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ ipch/
*.sdf
*.cachefile
win.vs2015/LabSound.VC.*
labsound/win.vs2017/.vs
labsound/win.vs2017/PredictedInputCache*.dat

# Visual Studio profiler
*.psess
Expand Down
70 changes: 46 additions & 24 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,54 @@
'-Wl,-Bsymbolic',
],
}],
['OS=="win"', {
'library_dirs': [
'<(module_root_dir)/labsound/build/x64/Release',
['OS=="win"', {
'configurations': {
'Debug': {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can release come first? Might be easier to scan between the os flavors.

'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': '3' # /MDd
},
},
'library_dirs': [
'<(module_root_dir)/labsound/build/x64/Debug',
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win')\")",
],
'libraries': [
'LabSound.lib',
'avformat.lib',
'avcodec.lib',
'avutil.lib',
'swscale.lib',
'swresample.lib',
],
'copies': [
{
'destination': '<(module_root_dir)/build/Release/',
'files': [
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avformat-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avcodec-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avutil-56.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swscale-5.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swresample-3.dll')\")",
]
}
],
],
},
'Release': {
'library_dirs': [
'<(module_root_dir)/labsound/build/x64/Release',
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win')\")",
],
},
},
'copies': [{
'destination': '<(module_root_dir)/build/Debug/',
'files': [
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avformat-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avcodec-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avutil-56.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swscale-5.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swresample-3.dll')\")",
]
}, {
'destination': '<(module_root_dir)/build/Release/',
'files': [
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avformat-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avcodec-58.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/avutil-56.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swscale-5.dll')\")",
"<!(node -e \"console.log(require.resolve('native-video-deps').slice(0, -9) + '/lib/win/swresample-3.dll')\")",
]
}],
'libraries': [
'LabSound.lib',
'avformat.lib',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing?

'avcodec.lib',
'avutil.lib',
'swscale.lib',
'swresample.lib',
],
}],
['OS=="mac"', {
'library_dirs': [
'<(module_root_dir)/labsound/bin',
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');
const bindings = require('./build/Release/webaudio.node');
// const bindings = require('./build/Debug/webaudio.node');
const configuration = process.env.LABSOUND_DEBUG ? 'Debug' : 'Release';
const bindings = require(`./build/${configuration}/webaudio.node`)

const {PannerNode} = bindings;
PannerNode.setPath(path.join(__dirname, 'labsound', 'assets', 'hrtf'));
Expand Down
1 change: 1 addition & 0 deletions labsound/build-windows-debug.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
msbuild .\win.vs2017\LabSound.sln /p:Configuration=Debug /p:Platform=x64 /t:Clean,Build
10 changes: 5 additions & 5 deletions labsound/win.vs2017/LabSound.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,10 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..\include;$(ProjectDir)..\src;$(ProjectDir)..\third_party;$(ProjectDir)..\third_party\STK;$(ProjectDir)..\..\node_modules\native-video-deps\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;_ITERATOR_DEBUG_LEVEL=0;STATICALLY_LINKED_WITH_WTF;WIN32;D_VARIADIC_MAX=10;D_NOMINMAX;NOMINMAX;WTF_USE_WEBAUDIO_KISSFFT=1;__WINDOWS_WASAPI__;HAVE_NO_OFLOG;HAVE_BOOST_THREAD;HAVE_LIBDL;HAVE_ALLOCA;HAVE_UNISTD_H;__OS_WINDOWS__;__LITTLE_ENDIAN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>DEBUG;STATICALLY_LINKED_WITH_WTF;WIN32;D_VARIADIC_MAX=10;D_NOMINMAX;NOMINMAX;WTF_USE_WEBAUDIO_KISSFFT=1;__WINDOWS_WASAPI__;HAVE_NO_OFLOG;HAVE_BOOST_THREAD;HAVE_LIBDL;HAVE_ALLOCA;HAVE_UNISTD_H;__OS_WINDOWS__;__LITTLE_ENDIAN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
Expand Down Expand Up @@ -995,9 +995,9 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..\include;$(ProjectDir)..\src;$(ProjectDir)..\third_party;$(ProjectDir)..\third_party\STK;$(ProjectDir)..\..\node_modules\native-video-deps\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;_ITERATOR_DEBUG_LEVEL=0;STATICALLY_LINKED_WITH_WTF;WIN32;D_VARIADIC_MAX=10;D_NOMINMAX;NOMINMAX;WTF_USE_WEBAUDIO_KISSFFT=1;__WINDOWS_WASAPI__;HAVE_NO_OFLOG;HAVE_BOOST_THREAD;HAVE_LIBDL;HAVE_ALLOCA;HAVE_UNISTD_H;__OS_WINDOWS__;__LITTLE_ENDIAN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>DEBUG;STATICALLY_LINKED_WITH_WTF;WIN32;D_VARIADIC_MAX=10;D_NOMINMAX;NOMINMAX;WTF_USE_WEBAUDIO_KISSFFT=1;__WINDOWS_WASAPI__;HAVE_NO_OFLOG;HAVE_BOOST_THREAD;HAVE_LIBDL;HAVE_ALLOCA;HAVE_UNISTD_H;__OS_WINDOWS__;__LITTLE_ENDIAN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
Expand Down Expand Up @@ -1102,4 +1102,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>