Deployment on XBox One

FMOD Studio API

Firelight Technologies FMOD Studio API

Deployment on XBox One

Enabling XboxOne Microphone Input

To enable FMOD Studio the use of any microphone input, including Kinect, on the Xbox One. The Engine ini file specific for the platform, located in /Config/XboxOne/XboxOneEngine.ini, needs to have the following lines added:

[AppxManifest]
Package.Capabilities.mx:Capability[0].Name=kinectAudio
Package.Capabilities.mx:Capability[1].Name=kinectGamechat

Copying dll's to build

Add the following to GetFilesToDeployOrStage in XboxOnePlatform.Automation.cs, before the end of the function:

UE4.18

// FMOD code start
DirectoryReference FMODDLLPath = null;
if (Directory.Exists(Path.Combine(SC.ProjectRoot.ToString(), "Plugins/FMODStudio")))
{
    FMODDLLPath = DirectoryReference.Combine(SC.ProjectRoot, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(SC.LocalRoot.ToString(), "Engine/Plugins/FMODStudio")))
{
    FMODDLLPath = DirectoryReference.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio/Binaries/XBoxOne/");
}
else
{
    LogError("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log("Copying FMOD dlls to loose directory: " + RelativeBinPath);
    StagedDirectoryReference RelativeBinPathRef = new StagedDirectoryReference(RelativeBinPath);
    StageFileIfExists(StagedFileType.NonUFS, FileReference.Combine(FMODDLLPath, "fmod.dll"), RelativeBinPathRef, SC);
    StageFileIfExists(StagedFileType.NonUFS, FileReference.Combine(FMODDLLPath, "fmodL.dll"), RelativeBinPathRef, SC);
    StageFileIfExists(StagedFileType.NonUFS, FileReference.Combine(FMODDLLPath, "fmodstudio.dll"), RelativeBinPathRef, SC);
    StageFileIfExists(StagedFileType.NonUFS, FileReference.Combine(FMODDLLPath, "fmodstudioL.dll"), RelativeBinPathRef, SC);
}
// FMOD code end

Add the following to PrepTargetForDeployment in XboxOneDeploy.cs, in the same scope as 'DestDir':

// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(RelativeEnginePath, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(RelativeEnginePath, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else
{
    Log.TraceWarning("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log.TraceInformation("...copying the FMOD dlls...");
    string FMODDLLName = "fmod.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudio.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudioL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
}
// FMOD code end

UE4.17

// FMOD code start
DirectoryReference FMODDLLPath = null;
if (Directory.Exists(Path.Combine(SC.ProjectRoot.ToString(), "Plugins/FMODStudio")))
{
    FMODDLLPath = DirectoryReference.Combine(SC.ProjectRoot, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(SC.LocalRoot.ToString(), "Engine/Plugins/FMODStudio")))
{
    FMODDLLPath = DirectoryReference.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio/Binaries/XBoxOne/");
}
else
{
    LogError("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log("Copying FMOD dlls to loose directory: " + RelativeBinPath);
    StagedDirectoryReference RelativeBinPathRef = new StagedDirectoryReference(RelativeBinPath);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmod.dll", false, null, RelativeBinPathRef, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodL.dll", false, null, RelativeBinPathRef, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudio.dll", false, null, RelativeBinPathRef, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudioL.dll", false, null, RelativeBinPathRef, false, false);
}
// FMOD code end

Add the following to PrepTargetForDeployment in XboxOneDeploy.cs, in the same scope as 'DestDir':

// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(RelativeEnginePath, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(RelativeEnginePath, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else
{
    Log.TraceWarning("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log.TraceInformation("...copying the FMOD dlls...");
    string FMODDLLName = "fmod.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudio.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudioL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
}
// FMOD code end

UE4.16

// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio/Binaries/XBoxOne/");
}
else 
{
    LogError("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log("Copying FMOD dlls to loose directory: " + RelativeBinPath);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmod.dll", false, null, RelativeBinPath, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodL.dll", false, null, RelativeBinPath, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudio.dll", false, null, RelativeBinPath, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudioL.dll", false, null, RelativeBinPath, false, false);
}
// FMOD code end

Add the following to PrepTargetForDeployment in XboxOneDeploy.cs, before the end of the function:

// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(RelativeEnginePath, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(RelativeEnginePath, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else 
{
    Log.TraceWarning("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log.TraceInformation("...copying the FMOD dlls...");
    string FMODDLLName = "fmod.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudio.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudioL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
}
// FMOD code end

UE4.15

// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio/Binaries/XBoxOne/");
}
else 
{
    LogError("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log("Copying FMOD dlls to loose directory: " + RelativeBinPath);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmod.dll", false, null, RelativeBinPath, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodL.dll", false, null, RelativeBinPath, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudio.dll", false, null, RelativeBinPath, false, false);
    SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudioL.dll", false, null, RelativeBinPath, false, false);
}
// FMOD code end

Add the following to PrepTargetForDeployment in XboxOneDeploy.cs, before the end of the function:

// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(BuildConfiguration.RelativeEnginePath, "Plugins/FMODStudio")))
{
    FMODDLLPath = Path.Combine(BuildConfiguration.RelativeEnginePath, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else 
{
    Log.TraceWarning("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
    Log.TraceInformation("...copying the FMOD dlls...");
    string FMODDLLName = "fmod.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudio.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
    FMODDLLName = "fmodstudioL.dll";
    Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
    CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
}
// FMOD code end