diff --git a/TestVelGameServer/Assets/DFVoice.meta b/TestVelGameServer/Assets/DFVoice.meta new file mode 100644 index 0000000..13f07c5 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f3856b9b63a94ba09a5d20d88932b7a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Badge.meta b/TestVelGameServer/Assets/DFVoice/Badge.meta new file mode 100644 index 0000000..7b8c33a --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Badge.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 98cf225cd82a54f9c804fb2760b38ead +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoBlack.png b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoBlack.png new file mode 100644 index 0000000..db73483 Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoBlack.png differ diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoBlack.png.meta b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoBlack.png.meta new file mode 100644 index 0000000..be0f116 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoBlack.png.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 8282081fda0f8c748be6b2bac3dd784a +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoDark.png b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoDark.png new file mode 100644 index 0000000..0581a8a Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoDark.png differ diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoDark.png.meta b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoDark.png.meta new file mode 100644 index 0000000..c3e0958 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoDark.png.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 3d4fab423328fda40a2f401406dadb76 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoLight.png b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoLight.png new file mode 100644 index 0000000..66e576d Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoLight.png differ diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoLight.png.meta b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoLight.png.meta new file mode 100644 index 0000000..1f913e1 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoLight.png.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: c3c921702b53fea4dae4b146aa818b2a +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoWhite.png b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoWhite.png new file mode 100644 index 0000000..8872bd3 Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoWhite.png differ diff --git a/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoWhite.png.meta b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoWhite.png.meta new file mode 100644 index 0000000..d643030 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Badge/DaikonForgeLogoWhite.png.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 24302d8a8ec9ad74fa081d8d8cb2909c +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Docs.pdf b/TestVelGameServer/Assets/DFVoice/Docs.pdf new file mode 100644 index 0000000..32ef7dc Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Docs.pdf differ diff --git a/TestVelGameServer/Assets/DFVoice/Docs.pdf.meta b/TestVelGameServer/Assets/DFVoice/Docs.pdf.meta new file mode 100644 index 0000000..0675085 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Docs.pdf.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 4d700a7065bf7964d84cc7de62dbeb91 +DefaultImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Example.meta b/TestVelGameServer/Assets/DFVoice/Example.meta new file mode 100644 index 0000000..c2e2692 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Example.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 296dd3f5940c8400caf27b6479a8f2c7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Example/LocalDemo.unity b/TestVelGameServer/Assets/DFVoice/Example/LocalDemo.unity new file mode 100644 index 0000000..e3cb6c6 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Example/LocalDemo.unity @@ -0,0 +1,395 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 1 + m_BakeResolution: 50 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 6e3468f00aa6f45e99790aaefd8d4a76, type: 2} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &732922925 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 732922930} + - component: {fileID: 732922929} + - component: {fileID: 732922927} + - component: {fileID: 732922926} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &732922926 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732922925} + m_Enabled: 1 +--- !u!124 &732922927 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732922925} + m_Enabled: 1 +--- !u!20 &732922929 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732922925} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &732922930 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732922925} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &939624742 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 939624746} + - component: {fileID: 939624745} + - component: {fileID: 939624743} + - component: {fileID: 939624747} + - component: {fileID: 939624744} + m_Layer: 0 + m_Name: VoiceController + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &939624743 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 939624742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6e00d42098a712e4bb865682007cfe50, type: 3} + m_Name: + m_EditorClassIdentifier: + IsThreeDimensional: 0 + Equalize: 0 + EqualizeSpeed: 1 + TargetEqualizeVolume: 0.75 + MaxEqualization: 5 +--- !u!114 &939624744 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 939624742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ca697a6f27a261442a2c082beee1b411, type: 3} + m_Name: + m_EditorClassIdentifier: + ChunkSize: 640 + Mode: 1 + PushToTalk: 0 + AmplitudeThreshold: 0 +--- !u!114 &939624745 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 939624742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1bb25d2ec38162e44bc48af2fd16b223, type: 3} + m_Name: + m_EditorClassIdentifier: + DebugAudio: 1 + Mute: 0 + PacketLoss: 0 +--- !u!4 &939624746 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 939624742} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &939624747 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 939624742} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 diff --git a/TestVelGameServer/Assets/DFVoice/Example/LocalDemo.unity.meta b/TestVelGameServer/Assets/DFVoice/Example/LocalDemo.unity.meta new file mode 100644 index 0000000..f5be217 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Example/LocalDemo.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ec045c7ca1fe6804db8a47b3e5d727c2 +DefaultImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Example/LocalDemoSettings.lighting b/TestVelGameServer/Assets/DFVoice/Example/LocalDemoSettings.lighting new file mode 100644 index 0000000..5b06606 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Example/LocalDemoSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LocalDemoSettings + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 50 + m_Padding: 2 + m_TextureCompression: 0 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 1 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/TestVelGameServer/Assets/DFVoice/Example/LocalDemoSettings.lighting.meta b/TestVelGameServer/Assets/DFVoice/Example/LocalDemoSettings.lighting.meta new file mode 100644 index 0000000..05cf9e2 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Example/LocalDemoSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6e3468f00aa6f45e99790aaefd8d4a76 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/OpusSupport.unitypackage.meta b/TestVelGameServer/Assets/DFVoice/OpusSupport.unitypackage.meta new file mode 100644 index 0000000..244ba36 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/OpusSupport.unitypackage.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 609ba2406c6dd544e82c4888b22e9f80 +timeCreated: 1431819782 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Plugins.meta b/TestVelGameServer/Assets/DFVoice/Plugins.meta new file mode 100644 index 0000000..ee2d06e --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 982a9888097de4a4cb1cac058c1eebd9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/NSpeex.dll b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeex.dll new file mode 100644 index 0000000..8e4b8f4 Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeex.dll differ diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/NSpeex.dll.meta b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeex.dll.meta new file mode 100644 index 0000000..abc30fb --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeex.dll.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e1a495990ca2b94f9935416b28ae866 +MonoAssemblyImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/NSpeexLicense.txt b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeexLicense.txt new file mode 100644 index 0000000..a849b9e --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeexLicense.txt @@ -0,0 +1,12 @@ +Copyright (c) 2010, Christoph Fröschl +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of Christoph Fröschl nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/NSpeexLicense.txt.meta b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeexLicense.txt.meta new file mode 100644 index 0000000..f9db5c4 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/NSpeexLicense.txt.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 8b324bf9acc257d4e99d29e94a94afcc +TextScriptImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/Opus.meta b/TestVelGameServer/Assets/DFVoice/Plugins/Opus.meta new file mode 100644 index 0000000..d6ed610 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/Opus.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 065997cf0ef074461aff052861709a58 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64.meta b/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64.meta new file mode 100644 index 0000000..4df7c13 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9cf55d88c91364a4b9d95d4c4687f65d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64/opus.dll b/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64/opus.dll new file mode 100644 index 0000000..aae9266 Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64/opus.dll differ diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64/opus.dll.meta b/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64/opus.dll.meta new file mode 100644 index 0000000..14d5cf9 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/Opus/x86_64/opus.dll.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 66b2b536e42b51c4f8ca3828abe1aa4f +timeCreated: 1431804546 +licenseType: Store +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + OS: Windows + Linux: + enabled: 1 + settings: + CPU: x86 + Linux64: + enabled: 1 + settings: + CPU: x86_64 + LinuxUniversal: + enabled: 1 + settings: + CPU: AnyCPU + OSXIntel: + enabled: 1 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 1 + settings: + CPU: AnyCPU + OSXUniversal: + enabled: 1 + settings: + CPU: AnyCPU + WP8: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + Win: + enabled: 1 + settings: + CPU: None + Win64: + enabled: 1 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + iOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/OpusLicense.txt b/TestVelGameServer/Assets/DFVoice/Plugins/OpusLicense.txt new file mode 100644 index 0000000..32406f1 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/OpusLicense.txt @@ -0,0 +1,27 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Plugins/OpusLicense.txt.meta b/TestVelGameServer/Assets/DFVoice/Plugins/OpusLicense.txt.meta new file mode 100644 index 0000000..58eec02 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Plugins/OpusLicense.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8a0f3e963c6a7b04cb254f46050e85b9 +timeCreated: 1431821079 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/README.txt b/TestVelGameServer/Assets/DFVoice/README.txt new file mode 100644 index 0000000..9549171 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/README.txt @@ -0,0 +1,47 @@ +Thank you for choosing DaikonForge technology to power your game. +When using DaikonForge middleware in a game or application, we allow you to: + 1.) Display one of the included splash screens on game startup. + 2.) Display a small logo badge somewhere in your game + 3.) Add a section on DaikonForge products to your credits + +However, these are all totally optional - if you don't want to, it's entirely up to you. + +SPLASH SCREEN +Two such splash screens are included - one with a white background, and one with a black background. +The splash screen displays a “Powered By DaikonForge” logo. In addition to this, it includes placeholder copyright text at the bottom of the screen. +This placeholder should be replaced with text of the following form: + + This software application includes [used products here] + Copyright © 2014 DaikonForge All Rights Reserved + +Where products are separated as such: “X, Y, and Z” + +LOGO BADGE +A selection of DaikonForge logo badges can be found in the Badge subfolder of the DFVoice folder. This can be placed anywhere of your choosing in the game. + +END CREDITS +When mentioning DaikonForge products in your credits, it should take the following form: + + POWERED BY DAIKONFORGE TECHNOLOGY + +Followed by a list of plugins used. For instance, if your game used DFVoice, it would appear as follows: + + POWERED BY DAIKONFORGE TECHNOLOGY + - DFVoice + +EXPERIMENTAL OPUS SUPPORT +While the default codec is a managed port of Speex called NSpeex, DFVoice includes experimental support for the successor to Speex, called Opus. +To enable this support, import the included "OpusSupport.unitypackage", and reboot Unity in order to enable unsafe compilation. +Then, override GetCodec() to the following: + +public override IAudioCodec GetCodec() +{ + AudioUtils.FrequencyProvider = new OpusCodec.FrequencyProvider(); + return new OpusCodec( 64000 ); +} + +You'll also probably want to change the chunk size of the Microphone component for best results - I recommend a chunk size of 960 (this is the frame size of the Opus codec internally). + +The Opus codec wrapper takes the desired bitrate as a parameter. 64 kb/s is a good starting point - you can adjust it up if you need more quality, or adjust it down for lower bandwidth. +Included are two DLLs - one is a 32-bit version of the native Opus DLL, the other is a 64-bit version. These are Windows only. If you would like to get Opus working on other platforms, +you will need to download the Opus source code and compile it for your platform of choice. \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/README.txt.meta b/TestVelGameServer/Assets/DFVoice/README.txt.meta new file mode 100644 index 0000000..5a1a4e9 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/README.txt.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: de27eaa9120bcac4c8d8289d0223b9bd +TextScriptImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts.meta b/TestVelGameServer/Assets/DFVoice/Scripts.meta new file mode 100644 index 0000000..a60e130 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ecd54f10f7b29489da5d976b4f8cc4b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Codec.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Codec.meta new file mode 100644 index 0000000..de6183a --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Codec.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 39b94daba09dc44fb8c758ab2d29b39c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Codec/IAudioCodec.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/IAudioCodec.cs new file mode 100644 index 0000000..0e72d59 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/IAudioCodec.cs @@ -0,0 +1,30 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + /// + /// Represents an audio codec + /// + public interface IAudioCodec + { + /// + /// Called when new audio data is received from the microphone + /// + void OnAudioAvailable( BigArray rawPCM ); + + /// + /// Returns the next encoded frame, or NULL if there isn't one + /// + VoicePacketWrapper? GetNextEncodedFrame( int frequency ); + + /// + /// Decode the raw encoded frame into 32-bit float PCM + /// + BigArray DecodeFrame( VoicePacketWrapper data ); + + /// + /// Generate filler data for a missing frame + /// + BigArray GenerateMissingFrame( int frequency ); + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Codec/IAudioCodec.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/IAudioCodec.cs.meta new file mode 100644 index 0000000..4286451 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/IAudioCodec.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a644c5faa0c475c4d8cb23fceb0c33b5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Codec/SpeexCodec.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/SpeexCodec.cs new file mode 100644 index 0000000..68652c1 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/SpeexCodec.cs @@ -0,0 +1,157 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using System.Collections.Generic; + + public class SpeexCodec : IAudioCodec + { + public class FrequencyProvider : IFrequencyProvider + { + public int GetFrequency( FrequencyMode mode ) + { + switch( mode ) + { + case FrequencyMode.Narrow: + return 8000; + case FrequencyMode.Wide: + return 16000; + case FrequencyMode.UltraWide: + return 32000; + default: + return 16000; + } + } + } + + private class codecWrapper + { + public NSpeex.SpeexEncoder encoder; + public NSpeex.SpeexDecoder decoder; + + public codecWrapper( NSpeex.BandMode mode, bool vbr ) + { + encoder = new NSpeex.SpeexEncoder( mode ); + decoder = new NSpeex.SpeexDecoder( mode, false ); + + encoder.VBR = vbr; + encoder.Quality = 5; + } + } + + private Dictionary encoders; + + private Dictionary frameSizes = new Dictionary() + { + { 8000, 160 }, + { 16000, 320 }, + { 32000, 640 }, + }; + + private ChunkBuffer chunkBuffer; + private BigArray tempOutputArray; + private VoicePacketWrapper tempPacketWrapper; + + public SpeexCodec( bool VBR ) + { + encoders = new Dictionary() + { + { 8000, new codecWrapper( NSpeex.BandMode.Narrow, VBR ) }, + { 16000, new codecWrapper( NSpeex.BandMode.Wide, VBR ) }, + { 32000, new codecWrapper( NSpeex.BandMode.UltraWide, VBR ) }, + }; + + chunkBuffer = new ChunkBuffer(); + tempOutputArray = new BigArray( 1024, 0 ); + tempPacketWrapper = new VoicePacketWrapper( 0, 16, new byte[ 0 ] ); + } + + public void OnAudioAvailable( BigArray rawPCM ) + { + chunkBuffer.AddSamples( rawPCM ); + } + + public VoicePacketWrapper? GetNextEncodedFrame( int frequency ) + { + int frameSize = frameSizes[ frequency ]; + codecWrapper codec = encoders[ frequency ]; + + float[] chunk = TempArray.Obtain( frameSize ); + bool chunkAvailable = chunkBuffer.RetrieveChunk( chunk ); + if( !chunkAvailable ) + { + TempArray.Release( chunk ); + return null; + } + + tempPacketWrapper = new VoicePacketWrapper(); + tempPacketWrapper.Frequency = (byte)( frequency / 1000 ); + + short[] audio16bit = TempArray.Obtain( frameSize ); + for( int i = 0; i < frameSize; i++ ) + { + float val = chunk[ i ] * short.MaxValue; + audio16bit[ i ] = (short)val; + } + TempArray.Release( chunk ); + + byte[] buffer = TempArray.Obtain( audio16bit.Length * 2 ); + + int encoded = codec.encoder.Encode( audio16bit, 0, frameSize, buffer, 0, buffer.Length ); + + TempArray.Release( audio16bit ); + + tempPacketWrapper.RawData = new byte[ encoded ]; + + System.Buffer.BlockCopy( buffer, 0, tempPacketWrapper.RawData, 0, encoded ); + + TempArray.Release( buffer ); + + return tempPacketWrapper; + } + + public BigArray DecodeFrame( VoicePacketWrapper data ) + { + int frameSize = frameSizes[ data.Frequency * 1000 ]; + codecWrapper codec = encoders[ data.Frequency * 1000 ]; + + short[] decodedFrame16Bit = TempArray.Obtain( frameSize * 4 ); + int decoded = codec.decoder.Decode( data.RawData, 0, data.RawData.Length, decodedFrame16Bit, 0, false ); + + if( tempOutputArray.Length != decoded ) tempOutputArray.Resize( decoded ); + + for( int i = 0; i < decoded; i++ ) + { + float val = (float)decodedFrame16Bit[ i ]; + val /= short.MaxValue; + tempOutputArray[ i ] = val; + } + + TempArray.Release( decodedFrame16Bit ); + + return tempOutputArray; + } + + public BigArray GenerateMissingFrame( int frequency ) + { + int frameSize = frameSizes[ frequency * 1000 ]; + codecWrapper codec = encoders[ frequency * 1000 ]; + + short[] decodedFrame16Bit = TempArray.Obtain( frameSize * 4 ); + int decoded = codec.decoder.Decode( null, 0, 0, decodedFrame16Bit, 0, true ); + + if( tempOutputArray.Length != decoded ) tempOutputArray.Resize( decoded ); + + for( int i = 0; i < decoded; i++ ) + { + float val = (float)decodedFrame16Bit[ i ]; + val /= short.MaxValue; + tempOutputArray[ i ] = val; + } + + TempArray.Release( decodedFrame16Bit ); + + return tempOutputArray; + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Codec/SpeexCodec.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/SpeexCodec.cs.meta new file mode 100644 index 0000000..23a4b57 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Codec/SpeexCodec.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8495bcd6d39ea2149b087be58f649136 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Components.meta new file mode 100644 index 0000000..977529a --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09cb945d5f87945dfa3044a5357a0c5e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/TestLocalVoiceController.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Components/TestLocalVoiceController.cs new file mode 100644 index 0000000..1aa3d3e --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/TestLocalVoiceController.cs @@ -0,0 +1,26 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using UnityEngine; + + public class TestLocalVoiceController : VoiceControllerBase + { + public float PacketLoss = 0.1f; + + protected override void OnAudioDataEncoded( VoicePacketWrapper encodedFrame ) + { + if( Random.Range( 0f, 1f ) <= PacketLoss ) + { + return; + } + + ReceiveAudioData( encodedFrame ); + } + + public override bool IsLocal + { + get { return true; } + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/TestLocalVoiceController.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Components/TestLocalVoiceController.cs.meta new file mode 100644 index 0000000..c61b078 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/TestLocalVoiceController.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1bb25d2ec38162e44bc48af2fd16b223 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs new file mode 100644 index 0000000..a9de486 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs @@ -0,0 +1,56 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using DaikonForge.VoIP; +[RequireComponent(typeof(NetworkPlayer))] +public class VelVoiceController : VoiceControllerBase +{ + NetworkPlayer player; + public override bool IsLocal + { + get + { + + if(player == null) + { + return true; + } + else + { + return player.isLocal; + } + } + } + + // Start is called before the first frame update + void Start() + { + player = GetComponent(); + VoiceControllerCollection.RegisterVoiceController(this); + } + + // Update is called once per frame + void Update() + { + + } + + protected override void OnAudioDataEncoded(VoicePacketWrapper encodedFrame) + { + byte[] headers = encodedFrame.ObtainHeaders(); + byte[] data = encodedFrame.RawData; + player.sendAudioData(headers, data); + //send the headers and data separately + encodedFrame.ReleaseHeaders(); + + } + + public void receiveAudioFrame(byte[] headers, byte[] data) + { + VoicePacketWrapper packet = new VoicePacketWrapper(headers, data); + ReceiveAudioData(packet); + } + + + +} diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs.meta new file mode 100644 index 0000000..8606061 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VelVoiceController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 88ee76310a60b4cacb8c0451a7cb444a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs new file mode 100644 index 0000000..da3400b --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs @@ -0,0 +1,179 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using UnityEngine; + using System.Collections.Generic; + + public abstract class VoiceControllerBase : MonoBehaviour + { + /// + /// Gets whether this voice controller belongs to the local client or not + /// + public abstract bool IsLocal + { + get; + } + + /// + /// Gets the audio input device attached to this voice controller + /// + public AudioInputDeviceBase AudioInputDevice + { + get + { + return this.microphone; + } + } + + /// + /// Gets the audio output device attached to this voice controller + /// + public IAudioPlayer AudioOutputDevice + { + get + { + return this.speaker; + } + } + + /// + /// If true, play back received audio even if this belongs to the local client + /// + public bool DebugAudio = false; + + /// + /// If true, voice controller won't decode and play back received frames + /// + public bool Mute = false; + + protected AudioInputDeviceBase microphone; + protected IAudioPlayer speaker; + protected IAudioCodec codec; + + protected ulong nextFrameIndex = 0; + protected ulong nextExpectedIndex = 0; + + protected virtual void Awake() + { + codec = GetCodec(); + + microphone = GetComponent(); + speaker = GetComponent( typeof( IAudioPlayer ) ) as IAudioPlayer; + + if( microphone == null ) + { + Debug.LogError( "No audio input component attached to speaker", this ); + return; + } + + if( speaker == null ) + { + Debug.LogError( "No audio output component attached to speaker", this ); + return; + } + + if( IsLocal ) + { + microphone.OnAudioBufferReady += this.OnMicrophoneDataReady; + microphone.StartRecording(); + } + } + + protected virtual void OnDestroy() + { + if( IsLocal && microphone != null ) + { + microphone.OnAudioBufferReady -= this.OnMicrophoneDataReady; + microphone.StopRecording(); + } + } + + /// + /// Called when a frame of audio is encoded and ready to send + /// + protected virtual void OnAudioDataEncoded( VoicePacketWrapper encodedFrame ) + { + // TODO: send audio over network + } + + /// + /// Create a new codec + /// + protected virtual IAudioCodec GetCodec() + { + AudioUtils.FrequencyProvider = new SpeexCodec.FrequencyProvider(); + return new SpeexCodec( true ); + } + + /// + /// If you need to skip receiving a frame, you should call this function so it can advance the next expected index counter + /// + protected void SkipFrame() + { + nextExpectedIndex++; + } + + /// + /// Decode and play back received audio data + /// + protected virtual void ReceiveAudioData( VoicePacketWrapper encodedFrame ) + { + if( !IsLocal || DebugAudio ) + { + // discard old samples + if( encodedFrame.Index < nextExpectedIndex ) return; + + // voice controller is muted - don't bother decoding or buffering audio data + if( Mute ) + { + nextExpectedIndex = encodedFrame.Index + 1; + return; + } + + speaker.SetSampleRate( encodedFrame.Frequency * 1000 ); + + // some frames were lost, generate filler data for them + // unless the speaker isn't playing any sound, in which case filler data will only delay the stream further + // OR unless nextExpectedIndex is zero, implying that we haven't received any frames yet + if( nextExpectedIndex != 0 && encodedFrame.Index != nextExpectedIndex && speaker.PlayingSound ) + { + int numMissingFrames = (int)( encodedFrame.Index - nextExpectedIndex ); + + for( int i = 0; i < numMissingFrames; i++ ) + { + BigArray filler = codec.GenerateMissingFrame( encodedFrame.Frequency ); + speaker.BufferAudio( filler ); + } + } + + BigArray decoded = codec.DecodeFrame( encodedFrame ); + speaker.BufferAudio( decoded ); + + nextExpectedIndex = encodedFrame.Index + 1; + } + } + + /// + /// Called when new audio is available from the microphone + /// + protected virtual void OnMicrophoneDataReady( BigArray newData, int frequency ) + { + if( !IsLocal ) return; + + codec.OnAudioAvailable( newData ); + + VoicePacketWrapper? enc = codec.GetNextEncodedFrame( frequency ); + while( enc.HasValue ) + { + // assign index + VoicePacketWrapper packet = enc.Value; + packet.Index = nextFrameIndex++; + enc = packet; + + OnAudioDataEncoded( enc.Value ); + enc = codec.GetNextEncodedFrame( frequency ); + } + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs.meta new file mode 100644 index 0000000..d441508 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Components/VoiceControllerBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d417da3dc9eadb24793f13fbb74b7e09 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO.meta b/TestVelGameServer/Assets/DFVoice/Scripts/IO.meta new file mode 100644 index 0000000..1db0c3e --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 866c4f5eb18f24923bac66b4807ab6b3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioClipInputDevice.cs b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioClipInputDevice.cs new file mode 100644 index 0000000..d98880c --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioClipInputDevice.cs @@ -0,0 +1,57 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using UnityEngine; + using System.Collections; + + public class AudioClipInputDevice : AudioInputDeviceBase + { + public AudioClip testClip; + public FrequencyMode ResampleFrequency = FrequencyMode.Wide; + + public override void StartRecording() + { + float[] data = new float[ testClip.samples * testClip.channels ]; + testClip.GetData( data, 0 ); + + BigArray d = new BigArray( data.Length, 0 ); + d.Resize( data.Length ); + d.CopyFrom( data, 0, 0, data.Length * 4 ); + + //AudioUtils.Resample( d, testClip.frequency, AudioUtils.GetFrequency( ResampleFrequency ) ); + + //bufferReady( d, AudioUtils.GetFrequency( ResampleFrequency ) ); + StartCoroutine( yieldChunks( d, testClip.frequency, 1f ) ); + } + + private IEnumerator yieldChunks( BigArray data, int chunkSize, float chunkDuration ) + { + int readHead = 0; + + while( readHead < data.Length ) + { + int remainder = chunkSize; + if( readHead + chunkSize >= data.Length ) + { + remainder = data.Length - readHead; + } + + BigArray temp = new BigArray( remainder, 0 ); + temp.Resize( remainder ); + temp.CopyFrom( data.Items, readHead * 4, 0, remainder * 4 ); + AudioUtils.Resample( temp, testClip.frequency, AudioUtils.GetFrequency( ResampleFrequency ) ); + + bufferReady( temp, AudioUtils.GetFrequency( ResampleFrequency ) ); + + readHead += remainder; + + yield return new WaitForSeconds( chunkDuration ); + } + } + + public override void StopRecording() + { + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioClipInputDevice.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioClipInputDevice.cs.meta new file mode 100644 index 0000000..ea5b427 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioClipInputDevice.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9967234445f1b0f4189095bb0ac74468 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioInputDeviceBase.cs b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioInputDeviceBase.cs new file mode 100644 index 0000000..2de5a95 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioInputDeviceBase.cs @@ -0,0 +1,38 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using UnityEngine; + + /// + /// Event handler for when new audio data becomes available + /// + public delegate void AudioBufferReadyHandler( BigArray newData, int frequency ); + + /// + /// Base class for audio input devices + /// + public abstract class AudioInputDeviceBase : MonoBehaviour + { + /// + /// Called when new audio data becomes available + /// + public event AudioBufferReadyHandler OnAudioBufferReady; + + /// + /// Start recording audio data + /// + public abstract void StartRecording(); + + /// + /// Stop recording audio data + /// + public abstract void StopRecording(); + + protected void bufferReady( BigArray newData, int frequency ) + { + if( OnAudioBufferReady != null ) + OnAudioBufferReady( newData, frequency ); + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioInputDeviceBase.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioInputDeviceBase.cs.meta new file mode 100644 index 0000000..074ff58 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/AudioInputDeviceBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51a1dfa85ff93f340aaff134a7a5cb88 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/IAudioPlayer.cs b/TestVelGameServer/Assets/DFVoice/Scripts/IO/IAudioPlayer.cs new file mode 100644 index 0000000..ad85242 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/IAudioPlayer.cs @@ -0,0 +1,14 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + /// + /// Interface for classes which can play received audio + /// + public interface IAudioPlayer + { + bool PlayingSound { get; } + void SetSampleRate( int sampleRate ); + void BufferAudio( BigArray audioData ); + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/IAudioPlayer.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/IO/IAudioPlayer.cs.meta new file mode 100644 index 0000000..bb559f6 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/IAudioPlayer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 02df04439ff9f7444bc43a4154e5af15 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/MicrophoneInputDevice.cs b/TestVelGameServer/Assets/DFVoice/Scripts/IO/MicrophoneInputDevice.cs new file mode 100644 index 0000000..a1cc0e6 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/MicrophoneInputDevice.cs @@ -0,0 +1,174 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using UnityEngine; + + [AddComponentMenu( "DFVoice/Microphone Input Device" )] + public class MicrophoneInputDevice : AudioInputDeviceBase + { + public static string DefaultMicrophone = null; + + /// + /// Gets the device that is actively being used to record audio + /// + public string ActiveDevice + { + get + { + return device; + } + } + + public int ChunkSize = 640; + public FrequencyMode Mode = FrequencyMode.Wide; + + public KeyCode PushToTalk = KeyCode.None; + + public float AmplitudeThreshold = 0f; + + private AudioClip recordedAudio; + private int prevReadPosition = 0; + private BigArray resampleBuffer; + + private string device = null; + private int recordingFrequency; + + private float pushToTalkTimer = 0f; + + public override void StartRecording() + { + if( !Application.HasUserAuthorization( UserAuthorization.Microphone ) ) + { + Debug.LogWarning( "StartRecording(): Webplayer microphone access denied" ); + return; + } + + device = DefaultMicrophone; + + prevReadPosition = 0; + + this.recordingFrequency = AudioUtils.GetFrequency( Mode ); + + int min, max; + Microphone.GetDeviceCaps( device, out min, out max ); + + if( max == 0 ) max = 48000; + //if( max == 0 ) max = 16000; + + int frequency = Mathf.Clamp( this.recordingFrequency, min, max ); + + resampleBuffer = new BigArray( ChunkSize, 0 ); + recordedAudio = Microphone.Start( device, true, 5, frequency ); + } + + public override void StopRecording() + { + Microphone.End( device ); + } + + /// + /// Switch over to a new device + /// + public void ChangeMicrophoneDevice( string newDevice ) + { + StopRecording(); + + DefaultMicrophone = newDevice; + + StartRecording(); + } + + void Update() + { + if( !Microphone.IsRecording( device ) || recordedAudio == null ) + { + return; + } + + float[] tempArray = TempArray.Obtain( ChunkSize ); + + // in case of recompile + if( resampleBuffer == null ) + { + resampleBuffer = new BigArray( ChunkSize, 0 ); + } + + int readPosition = Microphone.GetPosition( device ); + + if( readPosition >= ( prevReadPosition + ChunkSize ) ) + { + while( readPosition >= ( prevReadPosition + ChunkSize ) ) + { + if( canTalk() ) + { + recordedAudio.GetData( tempArray, prevReadPosition ); + if( exceedsVolumeThreshold( tempArray ) ) + { + resample( tempArray ); + bufferReady( resampleBuffer, this.recordingFrequency ); + } + } + + prevReadPosition += ChunkSize; + } + } + else if( prevReadPosition > readPosition ) + { + var endReadPos = readPosition + recordedAudio.samples; + var diff = endReadPos - prevReadPosition; + while( diff >= ChunkSize ) + { + if( canTalk() ) + { + recordedAudio.GetData( tempArray, prevReadPosition ); + if( exceedsVolumeThreshold( tempArray ) ) + { + resample( tempArray ); + bufferReady( resampleBuffer, this.recordingFrequency ); + } + } + + prevReadPosition += ChunkSize; + if( prevReadPosition >= recordedAudio.samples ) + { + prevReadPosition -= recordedAudio.samples; + break; + } + + endReadPos = readPosition + recordedAudio.samples; + diff = endReadPos - prevReadPosition; + } + } + + TempArray.Release( tempArray ); + } + + bool exceedsVolumeThreshold( float[] data ) + { + if( AmplitudeThreshold == 0f ) + return true; + + var max = Mathf.Max( data ); + return max >= AmplitudeThreshold; + } + + void resample( float[] tempArray ) + { + //resampleBuffer = new BigArray( tempArray.Length, tempArray.Length ); + resampleBuffer.Resize( tempArray.Length ); + resampleBuffer.CopyFrom( tempArray, 0, 0, tempArray.Length * 4 ); + //Debug.Log( "Resampling from: " + recordedAudio.frequency + ", to: " + this.recordingFrequency ); + AudioUtils.Resample( resampleBuffer, recordedAudio.frequency, this.recordingFrequency ); + } + + bool canTalk() + { + if( PushToTalk == KeyCode.None ) return true; + if( Input.GetKey( PushToTalk ) ) pushToTalkTimer = 0.2f; + + pushToTalkTimer -= Time.deltaTime; + return pushToTalkTimer > 0f; + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/MicrophoneInputDevice.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/IO/MicrophoneInputDevice.cs.meta new file mode 100644 index 0000000..6dc80f3 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/MicrophoneInputDevice.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ca697a6f27a261442a2c082beee1b411 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/UnityAudioPlayer.cs b/TestVelGameServer/Assets/DFVoice/Scripts/IO/UnityAudioPlayer.cs new file mode 100644 index 0000000..a522e8f --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/UnityAudioPlayer.cs @@ -0,0 +1,145 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using UnityEngine; + + /// + /// Implements an audio player which writes to a streaming audio clip + /// + [AddComponentMenu( "DFVoice/Unity Audio Player" )] + [RequireComponent( typeof( AudioSource ) )] + public class UnityAudioPlayer : MonoBehaviour, IAudioPlayer + { + public bool PlayingSound + { + get + { + return GetComponent().isPlaying; + } + } + + public bool IsThreeDimensional = false; + + public bool Equalize = false; + public float EqualizeSpeed = 1f; + public float TargetEqualizeVolume = 0.75f; + public float MaxEqualization = 5f; + + private int frequency = 16000; + + private int writeHead = 0; + private int totalWritten = 0; + private AudioClip playClip; + + private int delayForFrames = 0; + private int lastTime = 0; + private int played = 0; + + private float currentGain = 1f; + private float targetGain = 1f; + + void Start() + { + playClip = AudioClip.Create( "vc", frequency * 10, 1, frequency, false ); + + // backwards compatibility + if( GetComponent() == null ) + gameObject.AddComponent(); + + GetComponent().clip = playClip; + GetComponent().Stop(); + GetComponent().loop = true; + GetComponent().spatialBlend = IsThreeDimensional ? 1f : 0f; + } + + void Update() + { + if( GetComponent().isPlaying ) + { + if( lastTime > GetComponent().timeSamples ) + { + played += GetComponent().clip.samples; + } + + lastTime = GetComponent().timeSamples; + + currentGain = Mathf.MoveTowards( currentGain, targetGain, Time.deltaTime * EqualizeSpeed ); + + if( played + GetComponent().timeSamples >= totalWritten ) + { + GetComponent().Pause(); + delayForFrames = 2; + } + } + } + + void OnDestroy() + { + Destroy( GetComponent().clip ); + } + + public void SetSampleRate( int sampleRate ) + { + if( GetComponent() == null ) return; + + if( GetComponent().clip != null && GetComponent().clip.frequency == sampleRate ) return; + + this.frequency = sampleRate; + + if( GetComponent().clip != null ) + Destroy( GetComponent().clip ); + + playClip = AudioClip.Create( "vc", frequency * 10, 1, frequency, false ); + GetComponent().clip = playClip; + GetComponent().Stop(); + GetComponent().loop = true; + + writeHead = 0; + totalWritten = 0; + delayForFrames = 0; + lastTime = 0; + played = 0; + } + + public void BufferAudio( BigArray audioData ) + { + if( GetComponent() == null ) return; + + float[] temp = TempArray.Obtain( audioData.Length ); + audioData.CopyTo( 0, temp, 0, audioData.Length * 4 ); + + if( Equalize ) + { + float maxAmp = AudioUtils.GetMaxAmplitude( temp ); + targetGain = TargetEqualizeVolume / maxAmp; + + if( targetGain > MaxEqualization ) + targetGain = MaxEqualization; + + if( targetGain < currentGain ) + { + currentGain = targetGain; + } + + AudioUtils.ApplyGain( temp, currentGain ); + } + + playClip.SetData( temp, writeHead ); + TempArray.Release( temp ); + + writeHead += audioData.Length; + totalWritten += audioData.Length; + writeHead %= playClip.samples; + + if( !GetComponent().isPlaying ) + { + delayForFrames--; + if( delayForFrames <= 0 ) + { + GetComponent().Play(); + } + } + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/IO/UnityAudioPlayer.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/IO/UnityAudioPlayer.cs.meta new file mode 100644 index 0000000..dfc87cd --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/IO/UnityAudioPlayer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6e00d42098a712e4bb865682007cfe50 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Misc.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Misc.meta new file mode 100644 index 0000000..186f5f0 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Misc.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 076de0d8431e648998dd44e88ea74a9b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Misc/VoicePacketWrapper.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Misc/VoicePacketWrapper.cs new file mode 100644 index 0000000..7271ec0 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Misc/VoicePacketWrapper.cs @@ -0,0 +1,84 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + public struct VoicePacketWrapper + { + /// + /// The index of this voice packet (used to detect lost frames) + /// + public ulong Index; + + /// + /// The frequency (audio frequency = freqID * 1000) + /// + public byte Frequency; + + /// + /// The raw data which was sent + /// + public byte[] RawData; + + private byte[] tempHeaderData; + + public VoicePacketWrapper( ulong Index, int Frequency, byte[] RawData ) + { + tempHeaderData = null; + + this.Index = Index; + this.Frequency = (byte)( Frequency / 1000 ); + this.RawData = RawData; + } + + public VoicePacketWrapper( ulong Index, byte Frequency, byte[] RawData ) + { + tempHeaderData = null; + + this.Index = Index; + this.Frequency = Frequency; + this.RawData = RawData; + } + + public VoicePacketWrapper( byte[] headers, byte[] rawData ) + { + tempHeaderData = null; + + this.Index = System.BitConverter.ToUInt64( headers, 0 ); + this.Frequency = headers[ 8 ]; + this.RawData = rawData; + } + + public byte[] ObtainHeaders() + { + tempHeaderData = TempArray.Obtain( 9 ); // 8 bytes for ulong + 1 byte + + // extract bytes from ulong + byte b0 = (byte)( Index & 0x00000000000000ff ); + byte b1 = (byte)( ( Index & 0x000000000000ff00 ) >> 8 ); + byte b2 = (byte)( ( Index & 0x0000000000ff0000 ) >> 16 ); + byte b3 = (byte)( ( Index & 0x00000000ff000000 ) >> 24 ); + byte b4 = (byte)( ( Index & 0x000000ff00000000 ) >> 32 ); + byte b5 = (byte)( ( Index & 0x0000ff0000000000 ) >> 40 ); + byte b6 = (byte)( ( Index & 0x00ff000000000000 ) >> 48 ); + byte b7 = (byte)( ( Index & 0xff00000000000000 ) >> 56 ); + + tempHeaderData[ 0 ] = b0; + tempHeaderData[ 1 ] = b1; + tempHeaderData[ 2 ] = b2; + tempHeaderData[ 3 ] = b3; + tempHeaderData[ 4 ] = b4; + tempHeaderData[ 5 ] = b5; + tempHeaderData[ 6 ] = b6; + tempHeaderData[ 7 ] = b7; + + tempHeaderData[ 8 ] = Frequency; + + return tempHeaderData; + } + + public void ReleaseHeaders() + { + TempArray.Release( tempHeaderData ); + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Misc/VoicePacketWrapper.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Misc/VoicePacketWrapper.cs.meta new file mode 100644 index 0000000..234dd08 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Misc/VoicePacketWrapper.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1309269c62ff78d4b9929415ee7f18ac +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils.meta new file mode 100644 index 0000000..471a217 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e2149cce48a874a54bad45ecb828158a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/AudioUtils.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/AudioUtils.cs new file mode 100644 index 0000000..b6d1684 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/AudioUtils.cs @@ -0,0 +1,63 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using UnityEngine; + + public enum FrequencyMode + { + Narrow, + Wide, + UltraWide + } + + public interface IFrequencyProvider + { + int GetFrequency( FrequencyMode mode ); + } + + public class AudioUtils + { + public static IFrequencyProvider FrequencyProvider = new SpeexCodec.FrequencyProvider(); + private static FastList temp = new FastList(); + + public static int GetFrequency( FrequencyMode mode ) + { + return FrequencyProvider.GetFrequency( mode ); + } + + public static void Resample( BigArray samples, int oldFrequency, int newFrequency ) + { + if( oldFrequency == newFrequency ) return; + + temp.Clear(); + float ratio = (float)oldFrequency / (float)newFrequency; + int outSample = 0; + while( true ) + { + int inBufferIndex = (int)( outSample++ * ratio ); + if( inBufferIndex < samples.Length ) + temp.Add( samples[ inBufferIndex ] ); + else + break; + } + + samples.Resize( temp.Count ); + samples.CopyFrom( temp.Items, 0, 0, temp.Count * 4 ); + } + + public static void ApplyGain( float[] samples, float gain ) + { + for( int i = 0; i < samples.Length; i++ ) + samples[ i ] *= gain; + } + + public static float GetMaxAmplitude( float[] samples ) + { + float max = 0f; + for( int i = 0; i < samples.Length; i++ ) + max = Mathf.Max( max, Mathf.Abs( samples[ i ] ) ); + return max; + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/AudioUtils.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/AudioUtils.cs.meta new file mode 100644 index 0000000..30ea0d1 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/AudioUtils.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c02370e0d553ba4abc46b1410180db4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/BigArray.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/BigArray.cs new file mode 100644 index 0000000..c7d8c97 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/BigArray.cs @@ -0,0 +1,74 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + public class BigArray + { + private T[] items; + private int count; + + public BigArray( int capacity, int count ) + { + items = new T[ capacity ]; + this.count = count; + } + + public T this[ int index ] + { + get + { + if( index >= count ) + throw new System.IndexOutOfRangeException(); + + return items[ index ]; + } + set + { + if( index >= count ) + throw new System.IndexOutOfRangeException(); + + items[ index ] = value; + } + } + + public int Length + { + get + { + return count; + } + } + + public T[] Items + { + get + { + return items; + } + } + + public void Resize( int newSize ) + { + this.count = newSize; + if( this.items.Length < newSize ) + { + System.Array.Resize( ref this.items, newSize * 2 ); + } + } + + public void CopyTo( int startIndex, BigArray destination, int destIndex, int count ) + { + System.Buffer.BlockCopy( items, startIndex, destination.items, destIndex, count ); + } + + public void CopyTo( int startIndex, T[] destination, int destIndex, int count ) + { + System.Buffer.BlockCopy( items, startIndex, destination, destIndex, count ); + } + + public void CopyFrom( T[] source, int sourceIndex, int destIndex, int count ) + { + System.Buffer.BlockCopy( source, sourceIndex, this.items, destIndex, count ); + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/BigArray.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/BigArray.cs.meta new file mode 100644 index 0000000..8eb239a --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/BigArray.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ba3ab656ee82c4f43884683c0e1c7cf5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/ChunkBuffer.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/ChunkBuffer.cs new file mode 100644 index 0000000..f45eaa2 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/ChunkBuffer.cs @@ -0,0 +1,46 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + /// + /// Helper class for separating input microphone data into chunks of a certain number of samples + /// + public class ChunkBuffer + { + //private List samples = new List(); + private FastList samples = new FastList(); + + /// + /// Add incoming samples to the buffer + /// + public void AddSamples( BigArray incomingSamples ) + { + int writeIndex = samples.Count * 4; + int newLength = samples.Count + incomingSamples.Length; + int writeBytes = incomingSamples.Length * 4; + samples.EnsureCapacity( newLength ); + samples.ForceCount( newLength ); + incomingSamples.CopyTo( 0, samples.Items, writeIndex, writeBytes ); + + //for( int i = 0; i < incomingSamples.Length; i++ ) + //{ + // samples[ writeIndex + i ] = incomingSamples[ i ]; + //} + } + + /// + /// Retrieve a chunk of the given size and fill destination array with samples + /// + /// True if a chunk is available, false otherwise + public bool RetrieveChunk( float[] destination ) + { + if( samples.Count < destination.Length ) return false; + for( int i = 0; i < destination.Length; i++ ) + { + destination[ i ] = samples[ i ]; + } + samples.RemoveRange( 0, destination.Length ); + return true; + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/ChunkBuffer.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/ChunkBuffer.cs.meta new file mode 100644 index 0000000..38a8c10 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/ChunkBuffer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9a6d1b38ea00c44d93f1b0d1dc2ab83 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/FastList.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/FastList.cs new file mode 100644 index 0000000..9879c60 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/FastList.cs @@ -0,0 +1,1144 @@ +/* Copyright 2013-2014 Daikon Forge */ + +namespace DaikonForge.VoIP +{ + using System; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a simplified Generic List customized specifically for + /// game development - Implements object pooling, minimizes memory + /// allocations during common operations, replaces common extension + /// methods with bespoke implementations that do not allocate + /// iterators, etc. + /// + public class FastList : IList, IDisposable + { + #region Object pooling + + #region Static variables + + // NOTE: Switched to Queue in an attempt to work around + // a bug in the version of Mono used by Unity on iOS - http://stackoverflow.com/q/16542915 + private static Queue pool = new Queue( 1024 ); + + #endregion + + /// + /// Releases all instances in the object pool. + /// + public static void ClearPool() + { + lock( pool ) + { + pool.Clear(); + pool.TrimExcess(); + } + } + + /// + /// Returns a reference to a instance. If there are + /// available instances in the object pool, the first available instance will + /// be returned. If there are no instances available, then a new instance + /// will be created. Use the function to return the instance + /// to the object pool. + /// + public static FastList Obtain() + { + lock( pool ) + { + if( pool.Count == 0 ) + return new FastList(); + + return (FastList)pool.Dequeue(); + } + } + + /// + /// Returns a reference to a instance. If there are + /// available instances in the object pool, the first available instance will + /// be returned. If there are no instances available, then a new instance + /// will be created. Use the function to return the instance + /// to the object pool. + /// + public static FastList Obtain( int capacity ) + { + var list = Obtain(); + + list.EnsureCapacity( capacity ); + + return list; + } + + /// + /// Releases the back to the object pool + /// + public void Release() + { + Clear(); + + lock( pool ) + { + pool.Enqueue( this ); + } + } + + #endregion + + #region Private instance fields + + private const int DEFAULT_CAPACITY = 128; + + private T[] items = new T[ DEFAULT_CAPACITY ]; + private int count = 0; + + private bool isElementTypeValueType = false; + //private bool isElementTypePoolable = false; + + #endregion + + #region Constructor + + internal FastList() + { +#if !UNITY_EDITOR && UNITY_METRO + isElementTypeValueType = typeof( T ).GetTypeInfo().IsValueType; + isElementTypePoolable = typeof( IPoolable ).GetTypeInfo().IsAssignableFrom( typeof( T ).GetTypeInfo() ); +#else + isElementTypeValueType = typeof( T ).IsValueType; + //isElementTypePoolable = typeof( IPoolable ).IsAssignableFrom( typeof( T ) ); +#endif + } + + internal FastList( IList listToClone ) + : this() + { + AddRange( listToClone ); + } + + internal FastList( int capacity ) + : this() + { + EnsureCapacity( capacity ); + } + + #endregion + + #region Public properties + + /// + /// Returns the number of items in the list + /// + public int Count + { + get { return this.count; } + } + + /// + /// Returns the number of items this list can hold without needing to + /// resize the internal array (for internal use only) + /// + internal int Capacity + { + get { return this.items.Length; } + } + + /// + /// Gets a value indicating whether the list is read-only. Inherited from IList<> + /// + public bool IsReadOnly + { + get { return false; } + } + + /// + /// Gets/Sets the item at the specified index + /// + public T this[ int index ] + { + get + { + if( index < 0 || index > this.count - 1 ) + throw new IndexOutOfRangeException(); + return this.items[ index ]; + } + set + { + if( index < 0 || index > this.count - 1 ) + throw new IndexOutOfRangeException(); + this.items[ index ] = value; + } + } + + /// + /// Allows direct access to the underlying + /// containing this list's data. This array will most likely contain more + /// elements than the list reports via the property. + /// This property is intended for internal use by the UI library and should + /// not be accessed by other code. + /// + internal T[] Items + { + get { return this.items; } + } + + #endregion + + #region Public methods + + /// + /// Adds a new item to the end of the list. Provided only for call-level + /// compatability with code that treats this collection as a Queue. + /// + public void Enqueue( T item ) + { + lock( items ) + { + this.Add( item ); + } + } + + /// + /// Returns the first item in the collection and removes it from the list. + /// Provided only for call-level compatability with code that treats this + /// collection as a Queue. + /// + public T Dequeue() + { + lock( items ) + { + if( this.count == 0 ) + throw new IndexOutOfRangeException(); + + var item = this.items[ 0 ]; + + this.RemoveAt( 0 ); + + return item; + } + } + + /// + /// Returns the last item in the collection and removes it frm the list. + /// Provided only for call-level compatibility with code that treats this + /// collection as a Stack. + /// + /// + public T Pop() + { + lock( items ) + { + if( this.count == 0 ) + throw new IndexOutOfRangeException(); + + var item = this.items[ this.count - 1 ]; + + this.count -= 1; + + return item; + } + } + + /// + /// Returns a shallow copy of this instance + /// + /// + public FastList Clone() + { + var clone = Obtain( this.count ); + + Array.Copy( this.items, 0, clone.items, 0, this.count ); + + clone.count = this.count; + + return clone; + } + + /// + /// Reverses the order of the elements in the list + /// + public void Reverse() + { + Array.Reverse( this.items, 0, this.count ); + } + + /// + /// Sorts the elements in the entire using the default comparer. + /// + public void Sort() + { + Array.Sort( this.items, 0, this.count, null ); + } + + /// + /// Sorts the elements in the entire using the specified comparer. + /// + public void Sort( IComparer comparer ) + { + Array.Sort( this.items, 0, this.count, comparer ); + } + + /// + /// Sorts the elements in the entire using the specified . + /// + /// The to use when comparing elements. + public void Sort( Comparison comparison ) + { + if( comparison == null ) + { + throw new ArgumentNullException( "comparison" ); + } + if( this.count > 0 ) + { + using( var comparer = FunctorComparer.Obtain( comparison ) ) + { + Array.Sort( this.items, 0, this.count, comparer ); + } + } + } + + /// + /// Ensures that the has enough capacity to store elements + /// + /// + public void EnsureCapacity( int Size ) + { + if( items.Length < Size ) + { + var newSize = ( Size / DEFAULT_CAPACITY ) * DEFAULT_CAPACITY + DEFAULT_CAPACITY; + Array.Resize( ref this.items, newSize ); + } + } + + public void ForceCount( int count ) + { + this.count = count; + } + + /// + /// Adds the elements of the specified collection to the end of the + /// + public void AddRange( FastList list ) + { + var listCount = list.count; + + EnsureCapacity( this.count + listCount ); + Array.Copy( list.items, 0, this.items, this.count, listCount ); + this.count += listCount; + } + + /// + /// Adds the elements of the specified collection to the end of the + /// + public void AddRange( IList list ) + { + var listCount = list.Count; + + EnsureCapacity( this.count + listCount ); + + for( int i = 0; i < listCount; i++ ) + { + this.items[ count++ ] = list[ i ]; + } + } + + /// + /// Adds the elements of the specified collection to the end of the + /// + public void AddRange( T[] list ) + { + var listLength = list.Length; + + EnsureCapacity( this.count + listLength ); + Array.Copy( list, 0, this.items, this.count, listLength ); + this.count += listLength; + } + + /// + /// Determines the index of a specific item in the collection + /// + public int IndexOf( T item ) + { + return Array.IndexOf( this.items, item, 0, this.count ); + } + + /// + /// Inserts an item to the collection at the specified index + /// + /// + /// + public void Insert( int index, T item ) + { + EnsureCapacity( this.count + 1 ); + + if( index < this.count ) + { + Array.Copy( this.items, index, this.items, index + 1, this.count - index ); + } + + this.items[ index ] = item; + this.count += 1; + } + + /// + /// Inserts an array of items at the specified index + /// + public void InsertRange( int index, T[] array ) + { + if( array == null ) + throw new ArgumentNullException( "items" ); + + if( index < 0 || index > this.count ) + throw new ArgumentOutOfRangeException( "index" ); + + EnsureCapacity( this.count + array.Length ); + + if( index < this.count ) + { + Array.Copy( this.items, index, this.items, index + array.Length, this.count - index ); + } + + array.CopyTo( this.items, index ); + + this.count += array.Length; + } + + /// + /// Inserts a collection of items at the specified index + /// + public void InsertRange( int index, FastList list ) + { + if( list == null ) + throw new ArgumentNullException( "items" ); + + if( index < 0 || index > this.count ) + throw new ArgumentOutOfRangeException( "index" ); + + EnsureCapacity( this.count + list.count ); + + if( index < this.count ) + { + Array.Copy( this.items, index, this.items, index + list.count, this.count - index ); + } + + Array.Copy( list.items, 0, this.items, index, list.count ); + + this.count += list.count; + } + + /// + /// Removes all items matching the predicate condition from the list + /// + public void RemoveAll( Predicate predicate ) + { + var index = 0; + while( index < this.count ) + { + if( predicate( items[ index ] ) ) + { + RemoveAt( index ); + } + else + { + index += 1; + } + } + } + + /// + /// Removes the item at the specified index + /// + public void RemoveAt( int index ) + { + if( index >= this.count ) + { + throw new ArgumentOutOfRangeException(); + } + + this.count -= 1; + + if( index < this.count ) + { + Array.Copy( this.items, index + 1, this.items, index, this.count - index ); + } + + this.items[ this.count ] = default( T ); + } + + /// + /// Removes items from the collection at the specified index + /// + public void RemoveRange( int index, int length ) + { + if( index < 0 || length < 0 || this.count - index < length ) + { + throw new ArgumentOutOfRangeException(); + } + + if( count > 0 ) + { + this.count -= length; + if( index < this.count ) + { + Array.Copy( this.items, index + length, this.items, index, this.count - index ); + } + + Array.Clear( this.items, this.count, length ); + } + } + + /// + /// Adds an item to the collection + /// + public void Add( T item ) + { + EnsureCapacity( this.count + 1 ); + this.items[ this.count++ ] = item; + } + + /// + /// Adds two items to the collection + /// + public void Add( T item0, T item1 ) + { + EnsureCapacity( this.count + 2 ); + this.items[ this.count++ ] = item0; + this.items[ this.count++ ] = item1; + } + + /// + /// Adds three items to the collection + /// + public void Add( T item0, T item1, T item2 ) + { + EnsureCapacity( this.count + 3 ); + this.items[ this.count++ ] = item0; + this.items[ this.count++ ] = item1; + this.items[ this.count++ ] = item2; + } + + /// + /// Adds four items to the collection + /// + public void Add( T item0, T item1, T item2, T item3 ) + { + EnsureCapacity( this.count + 3 ); + this.items[ this.count++ ] = item0; + this.items[ this.count++ ] = item1; + this.items[ this.count++ ] = item2; + this.items[ this.count++ ] = item3; + } + + /// + /// Removes all items from the collection + /// + public void Clear() + { + if( !isElementTypeValueType ) + { + Array.Clear( this.items, 0, this.items.Length ); + } + + this.count = 0; + } + + /// + /// Resizes the internal buffer to exactly match the number of elements in the collection + /// + public void TrimExcess() + { + Array.Resize( ref this.items, this.count ); + } + + /// + /// Determines whether the collection contains the specified value + /// + public bool Contains( T item ) + { + if( item == null ) + { + for( int i = 0; i < this.count; i++ ) + { + if( this.items[ i ] == null ) + { + return true; + } + } + return false; + } + + EqualityComparer comparer = EqualityComparer.Default; + + for( int j = 0; j < this.count; j++ ) + { + if( comparer.Equals( this.items[ j ], item ) ) + { + return true; + } + } + + return false; + } + + /// + /// Copies the elements of the collection to a instance + /// + /// + public void CopyTo( T[] array ) + { + CopyTo( array, 0 ); + } + + /// + /// Copies the elements of the collection to an starting at the specified index + /// + public void CopyTo( T[] array, int arrayIndex ) + { + Array.Copy( this.items, 0, array, arrayIndex, this.count ); + } + + /// + /// Copies the elements of the collection to an + /// + /// The starting position in the collection + /// The destination array + /// The position in the array to start copying to + /// How many elements to copy + public void CopyTo( int sourceIndex, T[] dest, int destIndex, int length ) + { + if( sourceIndex + length > this.count ) + throw new IndexOutOfRangeException( "sourceIndex" ); + + if( dest == null ) + throw new ArgumentNullException( "dest" ); + + if( destIndex + length > dest.Length ) + throw new IndexOutOfRangeException( "destIndex" ); + + Array.Copy( this.items, sourceIndex, dest, destIndex, length ); + } + + /// + /// Removes the first occurrence of a specific object from the collection + /// + public bool Remove( T item ) + { + var index = IndexOf( item ); + if( index == -1 ) + return false; + + RemoveAt( index ); + + return true; + } + + /// + /// Returns a List<T> collection containing all elements of this collection + /// + /// + public List ToList() + { + var list = new List( this.count ); + list.AddRange( this.ToArray() ); + return list; + } + + /// + /// For internal use only. + /// + // @private + internal T[] ToTempArray() + { + var result = TempArray.Obtain( this.count ); + Array.Copy( items, 0, result, 0, this.count ); + return result; + } + + /// + /// Returns an array containing all elements of this collection + /// + public T[] ToArray() + { + var array = new T[ this.count ]; + + Array.Copy( this.items, 0, array, 0, this.count ); + + return array; + } + + /// + /// Returns a subset of the collection's items as an array + /// + public T[] ToArray( int index, int length ) + { + var array = new T[ this.count ]; + + if( this.count > 0 ) + { + CopyTo( index, array, 0, length ); + } + + return array; + } + + /// + /// Returns a subset of the collection's items as another dfList + /// + public FastList GetRange( int index, int length ) + { + var range = Obtain( length ); + CopyTo( 0, range.items, index, length ); + return range; + } + + #endregion + + #region LINQ replacement methods (avoids allocating enumerators) + + /// + /// Returns whether any items in the collection match the condition + /// defined by the predicate. + /// + /// A function to test each element for a condition. + /// true if any elements in the source sequence pass the test in the specified + /// predicate; otherwise, false. + public bool Any( Func predicate ) + { + for( int i = 0; i < this.count; i++ ) + { + if( predicate( this.items[ i ] ) ) + return true; + } + + return false; + } + + /// + /// Returns the first element in the list. Throws an exception if the list is empty. + /// + /// + public T First() + { + if( this.count == 0 ) + { + throw new IndexOutOfRangeException(); + } + + return this.items[ 0 ]; + } + + /// + /// Returns the first element of the collection, or a default value + /// if the collection contains no elements. + /// + public T FirstOrDefault() + { + if( this.count > 0 ) + return this.items[ 0 ]; + + return default( T ); + } + + /// + /// Returns the first element of the collection matching the condition defined by + /// , or the default value for the element type if the + /// collection contains no elements. + /// + public T FirstOrDefault( Func predicate ) + { + for( int i = 0; i < this.count; i++ ) + { + if( predicate( items[ i ] ) ) + return items[ i ]; + } + + return default( T ); + } + + /// + /// Returns the last element in the list. Throws an exception if the list is empty. + /// + public T Last() + { + if( this.count == 0 ) + { + throw new IndexOutOfRangeException(); + } + + return this.items[ this.count - 1 ]; + } + + /// + /// Returns the last element of the collection, or a default value + /// if the collection contains no elements. + /// + public T LastOrDefault() + { + if( this.count == 0 ) + { + return default( T ); + } + + return this.items[ this.count - 1 ]; + } + + /// + /// Returns the last element of the collection matching the condition defined by + /// , or the default value for the element type if the + /// collection contains no elements. + /// + public T LastOrDefault( Func predicate ) + { + var result = default( T ); + + for( int i = 0; i < this.count; i++ ) + { + if( predicate( items[ i ] ) ) + { + result = items[ i ]; + } + } + + return result; + } + + /// + /// Returns a list containing all elements + /// of the collection matching the condition specified by + /// + public FastList Where( Func predicate ) + { + var result = FastList.Obtain( this.count ); + + for( int i = 0; i < this.count; i++ ) + { + if( predicate( items[ i ] ) ) + { + result.Add( items[ i ] ); + } + } + + return result; + } + + /// + /// Returns the count of elements in the list that satisfy the + /// condition defined by + /// + public int Matching( Func predicate ) + { + var matching = 0; + + for( int i = 0; i < this.count; i++ ) + { + if( predicate( items[ i ] ) ) + matching += 1; + } + + return matching; + } + + /// + /// Projects each element of a sequence into a new form defined by + /// + public FastList Select( Func selector ) + { + var result = FastList.Obtain( this.count ); + + for( int i = 0; i < this.count; i++ ) + { + result.Add( selector( items[ i ] ) ); + } + + return result; + } + + /// + /// Returns a concatenated list containing all elements both lists + /// + public FastList Concat( FastList list ) + { + var result = FastList.Obtain( this.count + list.count ); + + result.AddRange( this ); + result.AddRange( list ); + + return result; + } + + /// + /// Converts all elements of the list to the specified target type + /// + public FastList Convert() + { + var result = FastList.Obtain( this.count ); + + for( int i = 0; i < this.count; i++ ) + { + result.Add( (TResult)System.Convert.ChangeType( this.items[ i ], typeof( TResult ) ) ); + } + + return result; + } + + /// + /// Performs an action on each element of the list + /// + /// The action to be performed on each element + public void ForEach( Action action ) + { + var index = 0; + while( index < this.Count ) + { + action( items[ index++ ] ); + } + } + + #endregion + + #region IEnumerable implementation + + // NOTE: The IEnumerable implementation here is horribly broken on iOS, and until + // I can figure out a way to implement typed enumerators that do work on iOS, please + // use a for(;;) loop instead of foreach(). Note that this may also apply to using + // LINQ queries, which may use foreach() or an GetEnumerator() internally. + + /// + /// Returns an IEnumerator instance that can be used to iterate through + /// the elements in this list. + /// + public IEnumerator GetEnumerator() + { + return PooledEnumerator.Obtain( this, null ); + } + + /// + /// Returns an IEnumerator instance that can be used to iterate through + /// the elements in this list. + /// + IEnumerator IEnumerable.GetEnumerator() + { + return PooledEnumerator.Obtain( this, null ); + } + + #endregion + + #region IDisposable implementation + + /// + /// Releases the memory used by this object and returns it to the object pool + /// + public void Dispose() + { + Release(); + } + + #endregion + + #region Nested classes + + /// + /// This custom enumerator class implements object pooling in order + /// to reduce the number and frequency of memory allocations. It is + /// primarily expected to be used by framework and library code which + /// treats the associated collection as an IEnumerable<T> rather + /// than as a . For instance, LINQ contains + /// several extension methods which will treat the collection as + /// an IEnumerable<T> and will create, use, and Dispose() of + /// the enumerator while performing the query. Similarly, many + /// third-party libraries will use a foreach() loop over a collection + /// rather than using for() with numeric indices, and the object pooling + /// implemented by this class will help to mitigate the number of + /// allocations typically caused by using such code. + /// + private class PooledEnumerator : IEnumerator, IEnumerable + { + + #region Static variables + + private static Queue pool = new Queue(); + + #endregion + + #region Private variables + + private FastList list; + private Func predicate; + private int currentIndex; + private T currentValue; + private bool isValid = false; + + #endregion + + #region Pooling + + public static PooledEnumerator Obtain( FastList list, Func predicate ) + { + var enumerator = ( pool.Count > 0 ) ? pool.Dequeue() : new PooledEnumerator(); + enumerator.ResetInternal( list, predicate ); + + return enumerator; + } + + public void Release() + { + if( this.isValid ) + { + this.isValid = false; + pool.Enqueue( this ); + } + } + + #endregion + + #region IEnumerator Members + + public T Current + { + get + { + if( !this.isValid ) + throw new InvalidOperationException( "The enumerator is no longer valid" ); + + return this.currentValue; + } + } + + #endregion + + #region Private utility methods + + private void ResetInternal( FastList list, Func predicate ) + { + this.isValid = true; + this.list = list; + this.predicate = predicate; + this.currentIndex = 0; + this.currentValue = default( T ); + } + + #endregion + + #region IDisposable Members + + public void Dispose() + { + Release(); + } + + #endregion + + #region IEnumerator Members + + object IEnumerator.Current + { + get + { + return this.Current; + } + } + + public bool MoveNext() + { + if( !this.isValid ) + throw new InvalidOperationException( "The enumerator is no longer valid" ); + + while( this.currentIndex < this.list.Count ) + { + var valueAtIndex = this.list[ currentIndex++ ]; + if( predicate != null ) + { + if( !predicate( valueAtIndex ) ) + continue; + } + + this.currentValue = valueAtIndex; + return true; + } + + Release(); + + this.currentValue = default( T ); + return false; + } + + public void Reset() + { + throw new NotImplementedException(); + } + + #endregion + + #region IEnumerable Members + + public IEnumerator GetEnumerator() + { + return this; + } + + IEnumerator IEnumerable.GetEnumerator() + { + return this; + } + + #endregion + } + + private class FunctorComparer : IComparer, IDisposable + { + #region Static variables + + private static Queue pool = new Queue(); + + #endregion + + #region Private instance variables + + private Comparison comparison; + + #endregion + + #region Object pooling + + public static FunctorComparer Obtain( Comparison comparison ) + { + var comparer = ( pool.Count > 0 ) ? pool.Dequeue() : new FunctorComparer(); + comparer.comparison = comparison; + return comparer; + } + + public void Release() + { + this.comparison = null; + + if( !pool.Contains( this ) ) + { + pool.Enqueue( this ); + } + } + + #endregion + + #region IComparer implementation + + public int Compare( T x, T y ) + { + return this.comparison( x, y ); + } + + #endregion + + #region IDisposable implementation + + public void Dispose() + { + this.Release(); + } + + #endregion + } + + #endregion + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/FastList.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/FastList.cs.meta new file mode 100644 index 0000000..799d50b --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/FastList.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 502cfd4e9701ec9468330d30344ded39 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/TempArray.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/TempArray.cs new file mode 100644 index 0000000..9c570ba --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/TempArray.cs @@ -0,0 +1,44 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using System.Collections.Generic; + + /// + /// Helper class for working with pooled arrays + /// + public class TempArray + { + private static Dictionary> pool = new Dictionary>(); + + /// + /// Obtain an array of the given length + /// + public static T[] Obtain( int length ) + { + Queue pool = getPool( length ); + if( pool.Count > 0 ) + { + return pool.Dequeue(); + } + return new T[ length ]; + } + + /// + /// Release an array back to the pool + /// + public static void Release( T[] array ) + { + pool[ array.Length ].Enqueue( array ); + } + + private static Queue getPool( int length ) + { + if( !pool.ContainsKey( length ) ) + { + pool[ length ] = new Queue(); + } + return pool[ length ]; + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/TempArray.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/TempArray.cs.meta new file mode 100644 index 0000000..e7e3d1f --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/TempArray.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5da0784531b4e9a43b5dccfe281696a9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerCollection.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerCollection.cs new file mode 100644 index 0000000..71f2e3b --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerCollection.cs @@ -0,0 +1,24 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using System.Collections.Generic; + + /// + /// Helper class for when you need a fast way to iterate voice controllers in the scene + /// + public class VoiceControllerCollection where T : VoiceControllerBase + { + public static List VoiceControllers = new List(); + + public static void RegisterVoiceController( T controller ) + { + VoiceControllers.Add( controller ); + } + + public static void UnregisterVoiceController( T controller ) + { + VoiceControllers.Remove( controller ); + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerCollection.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerCollection.cs.meta new file mode 100644 index 0000000..5325651 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerCollection.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fc9c446086ab0d940ba525da4590eb6a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerKeyedCollection.cs b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerKeyedCollection.cs new file mode 100644 index 0000000..d72b639 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerKeyedCollection.cs @@ -0,0 +1,33 @@ +/* Copyright (C) 2014 DaikonForge */ + +namespace DaikonForge.VoIP +{ + using System.Collections.Generic; + + /// + /// Helper class for when you need a way to index voice controllers by some key + /// + public class VoiceControllerKeyedCollection where T : VoiceControllerBase + { + protected static Dictionary voiceControllers = new Dictionary(); + + public static void RegisterVoiceController( K key, T controller ) + { + voiceControllers.Add( key, controller ); + } + + public static void UnregisterVoiceController( K key ) + { + voiceControllers.Remove( key ); + } + + public static T GetVoiceController( K key ) + { + if( !voiceControllers.ContainsKey( key ) ) + { + return null; + } + return voiceControllers[ key ]; + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerKeyedCollection.cs.meta b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerKeyedCollection.cs.meta new file mode 100644 index 0000000..5d054a2 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Scripts/Utils/VoiceControllerKeyedCollection.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 81d7f79eb5e8efe48ab96ea5fa969640 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash.meta b/TestVelGameServer/Assets/DFVoice/Splash.meta new file mode 100644 index 0000000..850b240 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d2777c77749140b4b09dee8aab0afce +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Animation.meta b/TestVelGameServer/Assets/DFVoice/Splash/Animation.meta new file mode 100644 index 0000000..1bddc95 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Animation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ea8801e741bc4a41a6b010771fb9a39 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Animation/Fader.controller b/TestVelGameServer/Assets/DFVoice/Splash/Animation/Fader.controller new file mode 100644 index 0000000..21023c3 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Animation/Fader.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Fader + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 110700000} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &110200000 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SplashFader + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: f366061147b28d3408ad5877385e8da9, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &110700000 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 110200000} + m_Position: {x: 50, y: 50, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 110200000} diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Animation/Fader.controller.meta b/TestVelGameServer/Assets/DFVoice/Splash/Animation/Fader.controller.meta new file mode 100644 index 0000000..a99bf24 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Animation/Fader.controller.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: a06ead484ad59b74b902fcf8e7c3fae8 +NativeFormatImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Animation/SplashFader.anim b/TestVelGameServer/Assets/DFVoice/Splash/Animation/SplashFader.anim new file mode 100644 index 0000000..9d23dcf --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Animation/SplashFader.anim @@ -0,0 +1,152 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SplashFader + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.5 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0 + inSlope: -0.5 + outSlope: -0.5 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3 + value: 0 + inSlope: 0.5 + outSlope: 0.5 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.5 + value: 0.5 + inSlope: 1 + outSlope: 1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: + classID: 131 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 304273561 + script: {fileID: 0} + typeID: 131 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 3.5 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.5 + inSlope: -1 + outSlope: -1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0 + inSlope: -0.5 + outSlope: -0.5 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3 + value: 0 + inSlope: 0.5 + outSlope: 0.5 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 3.5 + value: 0.5 + inSlope: 1 + outSlope: 1 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Color.a + path: + classID: 131 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Animation/SplashFader.anim.meta b/TestVelGameServer/Assets/DFVoice/Splash/Animation/SplashFader.anim.meta new file mode 100644 index 0000000..861b1ca --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Animation/SplashFader.anim.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: f366061147b28d3408ad5877385e8da9 +NativeFormatImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDark.unity b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDark.unity new file mode 100644 index 0000000..529305b --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDark.unity @@ -0,0 +1,472 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 1 + m_BakeResolution: 50 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: ad1b9dd66372b4442b5578f789961f98, type: 2} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &4596545 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4596546} + - component: {fileID: 4596547} + m_Layer: 0 + m_Name: splash + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4596546 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4596545} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 14510493} + - {fileID: 648983241} + - {fileID: 1182347998} + - {fileID: 609945526} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4596547 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4596545} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03e230922d32a4085e4e8f8ff663b7, type: 3} + m_Name: + m_EditorClassIdentifier: + SplashDuration: 3.5 + LoadScene: +--- !u!1 &14510491 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 14510493} + m_Layer: 0 + m_Name: copyright + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &14510493 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 14510491} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.5, y: 0.05, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &609945522 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 609945526} + - component: {fileID: 609945525} + - component: {fileID: 609945524} + - component: {fileID: 609945523} + m_Layer: 0 + m_Name: splashImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &609945523 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8ad9f8ccfc7201d4daa411af2aa69af6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &609945524 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &609945525 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &609945526 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.778, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &648983238 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 648983241} + - component: {fileID: 648983239} + m_Layer: 0 + m_Name: Fader + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!95 &648983239 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 648983238} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: a06ead484ad59b74b902fcf8e7c3fae8, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!4 &648983241 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 648983238} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.5, y: 0.5, z: 2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &960060042 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 960060047} + - component: {fileID: 960060046} + - component: {fileID: 960060044} + - component: {fileID: 960060043} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &960060043 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_Enabled: 1 +--- !u!124 &960060044 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_Enabled: 1 +--- !u!20 &960060046 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 0.5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &960060047 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1182347996 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1182347998} + m_Layer: 0 + m_Name: productList + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1182347998 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1182347996} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.5, y: 0.05, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDark.unity.meta b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDark.unity.meta new file mode 100644 index 0000000..e297aff --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDark.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 50420d3b4e87ebf43b617739dbefc8ae +DefaultImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDarkSettings.lighting b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDarkSettings.lighting new file mode 100644 index 0000000..a3f9a82 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDarkSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DFSplashDarkSettings + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 50 + m_Padding: 2 + m_TextureCompression: 0 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 1 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDarkSettings.lighting.meta b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDarkSettings.lighting.meta new file mode 100644 index 0000000..5b0f22c --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashDarkSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad1b9dd66372b4442b5578f789961f98 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLight.unity b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLight.unity new file mode 100644 index 0000000..c802856 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLight.unity @@ -0,0 +1,472 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 1 + m_BakeResolution: 50 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 2d3c86df094c441378837533d6b7dcb6, type: 2} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &4596545 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4596546} + - component: {fileID: 4596547} + m_Layer: 0 + m_Name: splash + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4596546 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4596545} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 14510493} + - {fileID: 648983241} + - {fileID: 1182347998} + - {fileID: 609945526} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4596547 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4596545} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d03e230922d32a4085e4e8f8ff663b7, type: 3} + m_Name: + m_EditorClassIdentifier: + SplashDuration: 3.5 + LoadScene: +--- !u!1 &14510491 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 14510493} + m_Layer: 0 + m_Name: copyright + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &14510493 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 14510491} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.5, y: 0.05, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &609945522 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 609945526} + - component: {fileID: 609945525} + - component: {fileID: 609945524} + - component: {fileID: 609945523} + m_Layer: 0 + m_Name: splashImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &609945523 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 226e4c6d02e72d945bc9cccc8b6615c1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &609945524 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &609945525 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &609945526 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 609945522} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.778, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &648983238 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 648983241} + - component: {fileID: 648983239} + m_Layer: 0 + m_Name: Fader + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!95 &648983239 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 648983238} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: a06ead484ad59b74b902fcf8e7c3fae8, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!4 &648983241 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 648983238} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.5, y: 0.5, z: 2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &960060042 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 960060047} + - component: {fileID: 960060046} + - component: {fileID: 960060044} + - component: {fileID: 960060043} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &960060043 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_Enabled: 1 +--- !u!124 &960060044 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_Enabled: 1 +--- !u!20 &960060046 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 0.5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &960060047 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 960060042} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1182347996 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1182347998} + m_Layer: 0 + m_Name: productList + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1182347998 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1182347996} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.5, y: 0.05, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4596546} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLight.unity.meta b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLight.unity.meta new file mode 100644 index 0000000..8a94883 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLight.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: c07532603a0e02149afb018e380d6bb6 +DefaultImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLightSettings.lighting b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLightSettings.lighting new file mode 100644 index 0000000..4b66dd6 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLightSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DFSplashLightSettings + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 50 + m_Padding: 2 + m_TextureCompression: 0 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 1 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLightSettings.lighting.meta b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLightSettings.lighting.meta new file mode 100644 index 0000000..4a1b123 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/DFSplashLightSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d3c86df094c441378837533d6b7dcb6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Materials.meta b/TestVelGameServer/Assets/DFVoice/Splash/Materials.meta new file mode 100644 index 0000000..5e2062b --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b1316d48c2f8545edb5331a6428f277c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashDark.mat b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashDark.mat new file mode 100644 index 0000000..5f537bb --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashDark.mat @@ -0,0 +1,29 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SplashDark + m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 2800000, guid: b1f1de25cd92b234f9ac044291736bce, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: [] + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashDark.mat.meta b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashDark.mat.meta new file mode 100644 index 0000000..8b05745 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashDark.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 8ad9f8ccfc7201d4daa411af2aa69af6 +NativeFormatImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashLight.mat b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashLight.mat new file mode 100644 index 0000000..ed45a74 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashLight.mat @@ -0,0 +1,29 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SplashLight + m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 2800000, guid: ff8dd18f2f10d284ab6434824157a6fb, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: [] + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashLight.mat.meta b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashLight.mat.meta new file mode 100644 index 0000000..aee213f --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Materials/SplashLight.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 226e4c6d02e72d945bc9cccc8b6615c1 +NativeFormatImporter: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Scripts.meta b/TestVelGameServer/Assets/DFVoice/Splash/Scripts.meta new file mode 100644 index 0000000..e5bdf2f --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5412c26a53d5b459eb88dd284f716800 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Scripts/SplashScreen.cs b/TestVelGameServer/Assets/DFVoice/Splash/Scripts/SplashScreen.cs new file mode 100644 index 0000000..60090ed --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Scripts/SplashScreen.cs @@ -0,0 +1,26 @@ +/* Copyright (C) 2014 DaikonForge */ + +using UnityEngine; +using System.Collections; + +namespace DaikonForge +{ + public class SplashScreen : MonoBehaviour + { + public float SplashDuration = 3.5f; + public string LoadScene = ""; + + IEnumerator Start() + { + if( string.IsNullOrEmpty( LoadScene ) ) + { + Debug.LogWarning( "SplashScreen: Load scene not set" ); + } + else + { + yield return new WaitForSeconds( SplashDuration ); + Application.LoadLevel( LoadScene ); + } + } + } +} \ No newline at end of file diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Scripts/SplashScreen.cs.meta b/TestVelGameServer/Assets/DFVoice/Splash/Scripts/SplashScreen.cs.meta new file mode 100644 index 0000000..abf7514 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Scripts/SplashScreen.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d03e230922d32a4085e4e8f8ff663b7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Source.meta b/TestVelGameServer/Assets/DFVoice/Splash/Source.meta new file mode 100644 index 0000000..62ffbbb --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Source.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d8caead97e402431ca08662289d2bea6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Source/Blank.png b/TestVelGameServer/Assets/DFVoice/Splash/Source/Blank.png new file mode 100644 index 0000000..0bbe4b4 Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Splash/Source/Blank.png differ diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Source/Blank.png.meta b/TestVelGameServer/Assets/DFVoice/Splash/Source/Blank.png.meta new file mode 100644 index 0000000..863c6cf --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Source/Blank.png.meta @@ -0,0 +1,45 @@ +fileFormatVersion: 2 +guid: f57f8c038f00f934782c10c54e9fb8c5 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplash.png b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplash.png new file mode 100644 index 0000000..2813435 Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplash.png differ diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplash.png.meta b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplash.png.meta new file mode 100644 index 0000000..4e81807 --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplash.png.meta @@ -0,0 +1,45 @@ +fileFormatVersion: 2 +guid: b1f1de25cd92b234f9ac044291736bce +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 2 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 5 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplashAlt.png b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplashAlt.png new file mode 100644 index 0000000..7c2d5ef Binary files /dev/null and b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplashAlt.png differ diff --git a/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplashAlt.png.meta b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplashAlt.png.meta new file mode 100644 index 0000000..146df5f --- /dev/null +++ b/TestVelGameServer/Assets/DFVoice/Splash/Source/DaikonForgeSplashAlt.png.meta @@ -0,0 +1,45 @@ +fileFormatVersion: 2 +guid: ff8dd18f2f10d284ab6434824157a6fb +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 2 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 5 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/TestVelGameServer/Assets/NetworkManager.cs b/TestVelGameServer/Assets/NetworkManager.cs index 09647a5..5195188 100644 --- a/TestVelGameServer/Assets/NetworkManager.cs +++ b/TestVelGameServer/Assets/NetworkManager.cs @@ -67,6 +67,7 @@ public class NetworkManager : MonoBehaviour if (m.text != "") { NetworkPlayer player = GameObject.Instantiate(playerPrefab).GetComponent(); + player.isLocal = true; player.userid = m.sender; players.Add(userid, player); player.room = m.text; @@ -87,6 +88,7 @@ public class NetworkManager : MonoBehaviour { //we got a join mesage, create it NetworkPlayer player = GameObject.Instantiate(playerPrefab).GetComponent(); + player.isLocal = false; player.room = m.text; player.userid = m.sender; player.manager = this; diff --git a/TestVelGameServer/Assets/NetworkPlayer.cs b/TestVelGameServer/Assets/NetworkPlayer.cs index 316f404..0c2dba2 100644 --- a/TestVelGameServer/Assets/NetworkPlayer.cs +++ b/TestVelGameServer/Assets/NetworkPlayer.cs @@ -1,6 +1,8 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using System.Text; +using System; public class NetworkPlayer : MonoBehaviour { @@ -9,7 +11,8 @@ public class NetworkPlayer : MonoBehaviour public string room; public NetworkManager manager; Vector3 networkPosition; - + + public bool isLocal = false; // Start is called before the first frame update void Start() { @@ -64,8 +67,22 @@ public class NetworkPlayer : MonoBehaviour networkPosition = new Vector3(x, y, z); break; } + case "2": //audio data + { + byte[] headers = Convert.FromBase64String(sections[1]); + byte[] data = Convert.FromBase64String(sections[2]); + this.GetComponent()?.receiveAudioFrame(headers, data); + break; + } } } } + public void sendAudioData(byte[] headers, byte[] data) + { + //base64 encode + string b64_headers = Convert.ToBase64String(headers); + string b64_data = Convert.ToBase64String(data); + manager.sendTo(1, "2," + b64_headers +","+b64_data + ";"); + } } diff --git a/TestVelGameServer/Assets/PlayerPrefab.prefab b/TestVelGameServer/Assets/PlayerPrefab.prefab index 241b76f..7ee12f1 100644 --- a/TestVelGameServer/Assets/PlayerPrefab.prefab +++ b/TestVelGameServer/Assets/PlayerPrefab.prefab @@ -13,6 +13,10 @@ GameObject: - component: {fileID: 6854617867369839} - component: {fileID: 5845716565458182149} - component: {fileID: 5713671764962751473} + - component: {fileID: 419667223} + - component: {fileID: 419667222} + - component: {fileID: 7186592055784235268} + - component: {fileID: 6500205698499660505} m_Layer: 0 m_Name: PlayerPrefab m_TagString: Untagged @@ -112,3 +116,147 @@ MonoBehaviour: username: room: manager: {fileID: 0} + isLocal: 0 +--- !u!82 &419667223 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6139051692386484099} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!114 &419667222 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6139051692386484099} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6e00d42098a712e4bb865682007cfe50, type: 3} + m_Name: + m_EditorClassIdentifier: + IsThreeDimensional: 0 + Equalize: 0 + EqualizeSpeed: 1 + TargetEqualizeVolume: 0.75 + MaxEqualization: 5 +--- !u!114 &7186592055784235268 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6139051692386484099} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 88ee76310a60b4cacb8c0451a7cb444a, type: 3} + m_Name: + m_EditorClassIdentifier: + DebugAudio: 0 + Mute: 0 +--- !u!114 &6500205698499660505 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6139051692386484099} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ca697a6f27a261442a2c082beee1b411, type: 3} + m_Name: + m_EditorClassIdentifier: + ChunkSize: 640 + Mode: 0 + PushToTalk: 32 + AmplitudeThreshold: 0 diff --git a/TestVelGameServer/Assets/Scenes/SampleScene.unity b/TestVelGameServer/Assets/Scenes/SampleScene.unity index ffca624..b159e48 100644 --- a/TestVelGameServer/Assets/Scenes/SampleScene.unity +++ b/TestVelGameServer/Assets/Scenes/SampleScene.unity @@ -1090,7 +1090,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 03a4d4e1a7fd74c7ab2eccca4ce168db, type: 3} m_Name: m_EditorClassIdentifier: - host: localhost + host: neko.ugavel.com port: 3290 userid: 0 room: @@ -1924,7 +1924,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 162.54999, y: 16.098969} + m_AnchoredPosition: {x: 162.54999, y: 16.098999} m_SizeDelta: {x: 315.1, y: -47.802124} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1894247854 diff --git a/TestVelGameServer/ProjectSettings/ProjectSettings.asset b/TestVelGameServer/ProjectSettings/ProjectSettings.asset index 4e57304..7e91d9e 100644 --- a/TestVelGameServer/ProjectSettings/ProjectSettings.asset +++ b/TestVelGameServer/ProjectSettings/ProjectSettings.asset @@ -345,7 +345,7 @@ PlayerSettings: enableCrashReportAPI: 0 cameraUsageDescription: locationUsageDescription: - microphoneUsageDescription: + microphoneUsageDescription: Allow voice communications switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144