Skip to content

Commit

Permalink
Merge pull request #11 from Schroedingers-Cat/plugin-name
Browse files Browse the repository at this point in the history
Create unique plugin name to avoid name collision with Unity's default plugins
  • Loading branch information
rodrigodzf authored May 14, 2019
2 parents 2620516 + d97cdf2 commit 1adf496
Show file tree
Hide file tree
Showing 25 changed files with 346 additions and 504 deletions.
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@


### Unity ###
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
/**/[Ll]ibrary/
/**/[Tt]emp/
/**/[Oo]bj/
/**/[Bb]uild/
/**/[Bb]uilds/
/**/Assets/AssetStoreTools*

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
Expand Down Expand Up @@ -85,6 +85,7 @@ xcuserdata/
[Rr]eleases/
x64/
x86/
!/**/Assets/Plugins/**
bld/
[Bb]in/
[Oo]bj/
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@ This library/plugin enables multichannel audio routing between Unity3D and JackA

### Windows

Install Jack v1.9.11 by following the instructions on the [Jack Audio website](http://jackaudio.org/faq/jack_on_windows.html).
Install Jack v1.9.11 by following the instructions on the [Jack Audio website](http://jackaudio.org/faq/jack_on_windows.html).
Make sure the JackRouter.dll is registered in your system.

Important: If you want to use a different Jack version, you have to compile the plugin from source by yourself.

### macOS and Linux
### macOS

Install the appropiate package for your plattform from the [website](https://github.com/jackaudio/jack2).
Install jackOSX Version 0.92_b3 binaries from [jackaudio.org/downloads](http://jackaudio.org/downloads/)

### Linux

Install the appropiate package for your plattform from the [website](https://github.com/jackaudio/jack2).

## Use

**Make sure Jack is Running first**.

Your Jack settings might look similar to these.

![Your Jack settings might look similar to these.](https://github.com/rodrigodzf/Jack-Audio-For-Unity/blob/master/settings.png)
![Your Jack settings might look similar to these.](https://github.com/rodrigodzf/Jack-Audio-For-Unity/blob/master/settings.png)

Import the JackAudio.unitypackage in your project and make sure Unity audio settings are the default ones. **The default audio block size is 'Best Performance' or 1024.**

There are two ways of using this plugin. As an audio filter or as an effect.

As an audio filter component, the JackSourceSend script must be attached to a GameObject with an AudioSource.
As an audio filter component, the JackSourceSend script must be attached to a GameObject with an AudioSource.

As an 'effect', you can add the 'Jack Send' effect to the appropiate Mixer Group.

Expand All @@ -38,5 +42,3 @@ Additionally an instance of JackMultiplexer must be present in the Scene at all
### Caveats

If the Unity window loses focus then the sound will stop. To prevent this you can check the *Run in Background* checkbox in player settings.


38 changes: 24 additions & 14 deletions UnityJack/VisualStudio/AudioPluginDemo.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F7CFEF5A-54BD-42E8-A59E-54ABAEB4EA9C}</ProjectGuid>
<RootNamespace>AudioPluginDemo</RootNamespace>
<RootNamespace>JackAudioForUnity</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>JackAudioForUnity</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
Expand Down Expand Up @@ -64,19 +66,31 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\$(Configuration)\$(Platform)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\$(Configuration)\$(Platform)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">build\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">build\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\$(Configuration)\$(Platform)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\$(Configuration)\$(Platform)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">build\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">build\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>AudioPlugin-$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>AudioPlugin-$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetName>AudioPlugin-$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>AudioPlugin-$(ProjectName)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
Expand All @@ -98,8 +112,7 @@
</Link>
<PostBuildEvent>
<Command>mkdir ..\..\sample_jackscene\Assets\Plugins\x86
copy "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86\$(TargetName).dll
</Command>
copy /y "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86\$(TargetName).dll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand All @@ -123,8 +136,7 @@ copy "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86\$(TargetName).dll
</Link>
<PostBuildEvent>
<Command>mkdir ..\..\sample_jackscene\Assets\Plugins\x86_64
copy /y "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86_64\$(TargetName).dll
</Command>
copy /y "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86_64\$(TargetName).dll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand Down Expand Up @@ -154,8 +166,7 @@ copy /y "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86_64\$(TargetNam
</Link>
<PostBuildEvent>
<Command>mkdir ..\..\sample_jackscene\Assets\Plugins\x86
copy "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86\$(TargetName).dll
</Command>
copy /y "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86\$(TargetName).dll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down Expand Up @@ -185,9 +196,8 @@ copy "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86\$(TargetName).dl
<AdditionalDependencies>kernel32.lib;user32.lib;winmm.lib;C:\Program Files (x86)\Jack\lib\libjack64.lib</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>mkdir ..\..\sample_jackscene\Assets\Plugins\x86_64
copy /y "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86_64\$(TargetName).dll
</Command>
<Command>mkdir ..\..\sample_jackscene\Assets\Plugins\x86_64
copy /y "$(TargetPath)" ..\..\sample_jackscene\Assets\Plugins\x86_64\$(TargetName).dll</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion UnityJack/Xcode/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
3D199B5F1858F3E60063EC53 /* AudioPluginUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioPluginUtil.h; path = ../AudioPluginUtil.h; sourceTree = "<group>"; };
3D199B6D1858F3E60063EC53 /* PluginList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginList.h; path = ../PluginList.h; sourceTree = "<group>"; };
3DA35E0E175F7CA000FA3842 /* AudioPluginInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioPluginInterface.h; path = ../AudioPluginInterface.h; sourceTree = "<group>"; };
8D576316048677EA00EA77CD /* AudioPluginDemo.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AudioPluginDemo.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
8D576316048677EA00EA77CD /* JackAudioForUnity.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JackAudioForUnity.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -113,7 +113,7 @@
19C28FB6FE9D52B211CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D576316048677EA00EA77CD /* AudioPluginDemo.bundle */,
8D576316048677EA00EA77CD /* JackAudioForUnity.bundle */,
2FC746C01DB2DD0B00BF70AF /* TestPlugin */,
);
name = Products;
Expand Down Expand Up @@ -162,7 +162,7 @@
name = Jack;
productInstallPath = "$(HOME)/Library/Bundles";
productName = AudioPluginDemo;
productReference = 8D576316048677EA00EA77CD /* AudioPluginDemo.bundle */;
productReference = 8D576316048677EA00EA77CD /* JackAudioForUnity.bundle */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
Expand All @@ -178,7 +178,7 @@
};
};
};
buildConfigurationList = 1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "AudioPluginDemo" */;
buildConfigurationList = 1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "JackAudioForUnity" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
Expand Down Expand Up @@ -235,7 +235,7 @@
buildSettings = {
COPY_PHASE_STRIP = NO;
DEPLOYMENT_LOCATION = YES;
DSTROOT = "$(PROJECT_DIR)/../../sample_jackscene/Assets";
DSTROOT = "$(PROJECT_DIR)/../../sample_jackscene/Assets/Plugins";
FRAMEWORK_SEARCH_PATHS = "";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
Expand All @@ -253,7 +253,8 @@
/usr/local/lib,
);
OTHER_LDFLAGS = "-ljack";
PRODUCT_NAME = AudioPluginDemo;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.JackAudioForUnity;
PRODUCT_NAME = JackAudioForUnity;
SKIP_INSTALL = NO;
USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/AudioUnitExamples/AUPublic/AUBase $(PROJECT_DIR)/AudioUnitExamples/AUPublic/OtherBases $(PROJECT_DIR)/AudioUnitExamples/AUPublic/Utility $(PROJECT_DIR)/AudioUnitExamples/PublicUtility";
WRAPPER_EXTENSION = bundle;
Expand All @@ -265,7 +266,7 @@
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_LOCATION = YES;
DSTROOT = "$(PROJECT_DIR)/../../sample_jackscene/Assets";
DSTROOT = "$(PROJECT_DIR)/../../sample_jackscene/Assets/Plugins";
FRAMEWORK_SEARCH_PATHS = "";
GCC_MODEL_TUNING = G5;
HEADER_SEARCH_PATHS = (
Expand All @@ -280,7 +281,8 @@
/usr/local/lib,
);
OTHER_LDFLAGS = "-ljack";
PRODUCT_NAME = AudioPluginDemo;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.JackAudioForUnity;
PRODUCT_NAME = JackAudioForUnity;
SKIP_INSTALL = NO;
USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/AudioUnitExamples/AUPublic/AUBase $(PROJECT_DIR)/AudioUnitExamples/AUPublic/OtherBases $(PROJECT_DIR)/AudioUnitExamples/AUPublic/Utility $(PROJECT_DIR)/AudioUnitExamples/PublicUtility";
WRAPPER_EXTENSION = bundle;
Expand Down Expand Up @@ -416,7 +418,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "AudioPluginDemo" */ = {
1DEB911E08733D790010E9CD /* Build configuration list for PBXProject "JackAudioForUnity" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB911F08733D790010E9CD /* Debug */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit 1adf496

Please sign in to comment.