feat: added fmod

This commit is contained in:
Gerard Gascón 2024-04-17 23:19:16 +02:00
parent c803300dce
commit 3471c31c32
416 changed files with 39455 additions and 171 deletions

View file

@ -0,0 +1,108 @@
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
#if UNITY_STANDALONE_LINUX && !UNITY_EDITOR
namespace FMOD
{
public partial class VERSION
{
public const string dll = "fmodstudio" + dllSuffix;
}
}
namespace FMOD.Studio
{
public partial class STUDIO_VERSION
{
public const string dll = "fmodstudio" + dllSuffix;
}
}
#endif
namespace FMODUnity
{
#if UNITY_EDITOR
[InitializeOnLoad]
#endif
public class PlatformLinux : Platform
{
static PlatformLinux()
{
Settings.AddPlatformTemplate<PlatformLinux>("b7716510a1f36934c87976f3a81dbf3d");
}
public override string DisplayName { get { return "Linux"; } }
public override void DeclareRuntimePlatforms(Settings settings)
{
settings.DeclareRuntimePlatform(RuntimePlatform.LinuxPlayer, this);
}
#if UNITY_EDITOR
public override IEnumerable<BuildTarget> GetBuildTargets()
{
yield return BuildTarget.StandaloneLinux64;
}
public override Legacy.Platform LegacyIdentifier { get { return Legacy.Platform.Linux; } }
protected override BinaryAssetFolderInfo GetBinaryAssetFolder(BuildTarget buildTarget)
{
return new BinaryAssetFolderInfo("linux", "Plugins");
}
protected override IEnumerable<FileRecord> GetBinaryFiles(BuildTarget buildTarget, bool allVariants, string suffix)
{
yield return new FileRecord(string.Format("x86_64/libfmodstudio{0}.so", suffix));
}
protected override IEnumerable<FileRecord> GetOptionalBinaryFiles(BuildTarget buildTarget, bool allVariants)
{
if (allVariants)
{
yield return new FileRecord("x86_64/libfmod.so");
yield return new FileRecord("x86_64/libfmodL.so");
}
yield return new FileRecord("x86_64/libgvraudio.so");
yield return new FileRecord("x86_64/libresonanceaudio.so");
}
protected override IEnumerable<string> GetObsoleteFiles()
{
yield return "platforms/linux/lib/x86/libfmodstudio.so";
yield return "platforms/linux/lib/x86/libfmodstudioL.so";
}
#endif
public override string GetPluginPath(string pluginName)
{
return string.Format("{0}/lib{1}.so", GetPluginBasePath(), pluginName);
}
#if UNITY_EDITOR
public override OutputType[] ValidOutputTypes
{
get
{
return sValidOutputTypes;
}
}
private static OutputType[] sValidOutputTypes = {
new OutputType() { displayName = "Pulse Audio", outputType = FMOD.OUTPUTTYPE.PULSEAUDIO },
new OutputType() { displayName = "Advanced Linux Sound Architecture", outputType = FMOD.OUTPUTTYPE.ALSA },
};
#endif
public override List<CodecChannelCount> DefaultCodecChannels { get { return staticCodecChannels; } }
private static List<CodecChannelCount> staticCodecChannels = new List<CodecChannelCount>()
{
new CodecChannelCount { format = CodecType.FADPCM, channels = 0 },
new CodecChannelCount { format = CodecType.Vorbis, channels = 32 },
};
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 73549a74f689f0849a8271d9e908c514
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: