Compare commits
6 Commits
283783954f
...
99015f5838
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8303a3eeefeacf4ca0c02b5d32e0cff
|
||||
folderAsset: yes
|
||||
timeCreated: 1621071543
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,155 +0,0 @@
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
namespace Cryville.Common.Network.Http11 {
|
||||
public class Http11Client : IDisposable {
|
||||
private readonly string _directHost;
|
||||
protected string DirectHost { get { return _directHost; } }
|
||||
|
||||
private readonly int _directPort;
|
||||
protected int DirectPort { get { return _directPort; } }
|
||||
|
||||
readonly Uri _baseUri;
|
||||
readonly int origPort;
|
||||
|
||||
protected const string Version = "HTTP/1.1";
|
||||
protected TcpClient TcpClient { get; private set; }
|
||||
protected Stream RawTcpStream { get { return TcpClient.GetStream(); } }
|
||||
protected virtual Stream Stream { get { return TcpClient.GetStream(); } }
|
||||
protected virtual string WindowsProxyProtocolName { get { return "http"; } }
|
||||
|
||||
private readonly bool _proxied = false;
|
||||
|
||||
public Dictionary<string, string> Headers { get; set; }
|
||||
|
||||
public Http11Client(Uri baseUri, int port = 80) {
|
||||
_directHost = baseUri.Host;
|
||||
_directPort = port;
|
||||
_baseUri = baseUri;
|
||||
origPort = _baseUri.Port;
|
||||
Headers = new Dictionary<string, string>();
|
||||
_proxied = GetProxy(ref _directHost, ref _directPort);
|
||||
Shared.Logger.Log(0, "Network", "Connecting to {0}:{1}", DirectHost, DirectPort);
|
||||
TcpClient = new TcpClient(DirectHost, DirectPort);
|
||||
}
|
||||
|
||||
public virtual void Connect() {
|
||||
if (_proxied) {
|
||||
Request(RawTcpStream, "CONNECT", string.Format(CultureInfo.InvariantCulture, "{0}:{1}", _baseUri.Host, origPort));
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Close() {
|
||||
TcpClient.Close();
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public virtual void Dispose(bool disposing) {
|
||||
if (disposing) {
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
public Http11Response Request(string method, Uri uri, string body = null, Encoding encoding = null) {
|
||||
string struri = GetUri(uri).PathAndQuery;
|
||||
return Request(Stream, method, struri, body, encoding);
|
||||
}
|
||||
|
||||
Http11Response Request(Stream stream, string method, string uri, string body = null, Encoding encoding = null) {
|
||||
var headers = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var h in Headers)
|
||||
headers.Add(h.Key, h.Value);
|
||||
headers["Host"] = _baseUri.Host;
|
||||
byte[] payload = null;
|
||||
if (body != null) {
|
||||
encoding ??= Encoding.UTF8;
|
||||
payload = encoding.GetBytes(body);
|
||||
headers.Add("Content-Encoding", encoding.EncodingName);
|
||||
headers.Add("Content-Length", payload.Length.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
using (var writer = new StreamWriter(stream, Encoding.ASCII, 1024, true)) {
|
||||
writer.Write(method);
|
||||
writer.Write(' ');
|
||||
writer.Write(uri);
|
||||
writer.Write(' ');
|
||||
writer.Write(Version);
|
||||
writer.Write("\r\n");
|
||||
foreach (var header in headers) {
|
||||
writer.Write(header.Key);
|
||||
writer.Write(':');
|
||||
writer.Write(header.Value);
|
||||
writer.Write("\r\n");
|
||||
}
|
||||
writer.Write("\r\n");
|
||||
if (payload != null) writer.Write(payload);
|
||||
writer.Flush();
|
||||
}
|
||||
var response = new Http11Response(stream);
|
||||
Shared.Logger.Log(0, "Network", "{0}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
protected bool GetProxy(ref string host, ref int port) {
|
||||
// TODO use winhttp.dll
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
|
||||
var reg = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings");
|
||||
var proxyEnable = (int)reg.GetValue("ProxyEnable");
|
||||
if (proxyEnable == 0) return false;
|
||||
var proxyStr = (string)reg.GetValue("ProxyServer");
|
||||
if (!string.IsNullOrEmpty(proxyStr)) {
|
||||
string[] proxies = proxyStr.Split(';');
|
||||
foreach (var p in proxies) {
|
||||
if (!p.Contains('=')) {
|
||||
string[] s = p.Split(':');
|
||||
host = s[0];
|
||||
port = int.Parse(s[1]);
|
||||
return true;
|
||||
}
|
||||
else if (p.StartsWith(WindowsProxyProtocolName + "=")) {
|
||||
string[] s = p.Split('=', ':');
|
||||
host = s[1];
|
||||
port = int.Parse(s[2]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected Uri GetUri(string path) {
|
||||
Uri address;
|
||||
if (_baseUri != null) {
|
||||
if (!Uri.TryCreate(_baseUri, path, out address)) {
|
||||
return new Uri(Path.GetFullPath(path));
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!Uri.TryCreate(path, UriKind.Absolute, out address)) {
|
||||
return new Uri(Path.GetFullPath(path));
|
||||
}
|
||||
}
|
||||
return GetUri(address);
|
||||
}
|
||||
|
||||
protected Uri GetUri(Uri address) {
|
||||
if (address == null) {
|
||||
throw new ArgumentNullException("address");
|
||||
}
|
||||
Uri uri = address;
|
||||
if (!address.IsAbsoluteUri && _baseUri != null && !Uri.TryCreate(_baseUri, address, out uri)) {
|
||||
return address;
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a795e416e54c69418de1a3c27a88932
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,71 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Cryville.Common.Network.Http11 {
|
||||
public class Http11Response : IDisposable {
|
||||
static readonly char[] spchar = new char[]{ ' ' };
|
||||
public string HttpVersion { get; private set; }
|
||||
public string StatusCode { get; private set; }
|
||||
public string ReasonPhase { get; private set; }
|
||||
public Dictionary<string, string> Headers { get; private set; }
|
||||
public Http11ResponseStream MessageBody { get; private set; }
|
||||
internal Http11Response(Stream stream) {
|
||||
var reader = new BinaryReader(stream, Encoding.ASCII);
|
||||
var statu_line = ReadLine(reader).Split(spchar, 3);
|
||||
HttpVersion = statu_line[0];
|
||||
StatusCode = statu_line[1];
|
||||
ReasonPhase = statu_line[2];
|
||||
Headers = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
while (ParseHeader(reader, Headers)) ;
|
||||
if (Headers.ContainsKey("content-length")) {
|
||||
int length = int.Parse(Headers["content-length"]);
|
||||
MessageBody = new Http11ResponseBlockStream(reader, length);
|
||||
}
|
||||
else if (Headers.ContainsKey("transfer-encoding") && Headers["transfer-encoding"] == "chunked") {
|
||||
MessageBody = new Http11ResponseChunkedStream(reader);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public virtual void Dispose(bool disposing) {
|
||||
if (disposing) {
|
||||
MessageBody.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
return string.Format("<{0} {1} {2}>", HttpVersion, StatusCode, ReasonPhase);
|
||||
}
|
||||
|
||||
internal static bool ParseHeader(BinaryReader reader, Dictionary<string, string> headers) {
|
||||
// TODO Multiline header
|
||||
var header = ReadLine(reader);
|
||||
if (header == "") return false;
|
||||
var s = header.Split(':', 2);
|
||||
string field_name = s[0].Trim().ToLower();
|
||||
string field_value = s[1].Trim();
|
||||
if (headers.ContainsKey(field_name)) headers[field_name] += "," + field_value;
|
||||
else headers.Add(field_name, field_value);
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static string ReadLine(BinaryReader reader) {
|
||||
StringBuilder result = new();
|
||||
char c;
|
||||
while (true) {
|
||||
c = reader.ReadChar();
|
||||
if (c == '\r') break;
|
||||
result.Append(c);
|
||||
}
|
||||
// TODO Unseekable
|
||||
reader.ReadByte();
|
||||
return result.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71234dd1c93d47b4893750686b2333a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,129 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace Cryville.Common.Network.Http11 {
|
||||
public abstract class Http11ResponseStream : Stream {
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
public override bool CanSeek { get { return false; } }
|
||||
|
||||
public override bool CanWrite { get { return false; } }
|
||||
|
||||
public override long Length { get { throw new NotSupportedException(); } }
|
||||
|
||||
public override long Position {
|
||||
get { throw new NotSupportedException(); }
|
||||
set { throw new NotSupportedException(); }
|
||||
}
|
||||
|
||||
public override void Flush() { }
|
||||
|
||||
public abstract byte[] ReadToEnd();
|
||||
|
||||
public override long Seek(long offset, SeekOrigin origin) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public override void SetLength(long value) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public override void Write(byte[] buffer, int offset, int count) {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class Http11ResponseBlockStream : Http11ResponseStream {
|
||||
readonly BinaryReader _reader;
|
||||
readonly int _length;
|
||||
int _pos = 0;
|
||||
internal Http11ResponseBlockStream(BinaryReader reader, int length) {
|
||||
_reader = reader;
|
||||
_length = length;
|
||||
}
|
||||
public override int Read(byte[] buffer, int offset, int count) {
|
||||
int recv = 0;
|
||||
int recv_len = System.Math.Min(count, _length - _pos);
|
||||
if (recv_len == 0) return 0;
|
||||
while (recv < recv_len) {
|
||||
recv += _reader.Read(buffer, offset + recv, count - recv);
|
||||
}
|
||||
_pos += recv_len;
|
||||
return recv_len;
|
||||
}
|
||||
public override byte[] ReadToEnd() {
|
||||
byte[] buffer = new byte[_length - _pos];
|
||||
Read(buffer, 0, buffer.Length);
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class Http11ResponseChunkedStream : Http11ResponseStream {
|
||||
readonly BinaryReader _reader;
|
||||
byte[] _chunk = null;
|
||||
int _pos = 0;
|
||||
internal Http11ResponseChunkedStream(BinaryReader reader) {
|
||||
_reader = reader;
|
||||
ReadChunk();
|
||||
}
|
||||
public void ReadChunk() {
|
||||
if (_chunk != null && _chunk.Length == 0) return;
|
||||
string[] chunkHeader = Http11Response.ReadLine(_reader).Split(';');
|
||||
if (!int.TryParse(chunkHeader[0], NumberStyles.HexNumber, CultureInfo.InvariantCulture, out int chunkSize))
|
||||
throw new IOException("Corrupted chunk received");
|
||||
if (chunkSize == 0) {
|
||||
_chunk = new byte[0];
|
||||
// TODO TE Header, now just discard
|
||||
var headers = new Dictionary<string, string>();
|
||||
while (Http11Response.ParseHeader(_reader, headers)) ;
|
||||
return;
|
||||
}
|
||||
_chunk = new byte[chunkSize];
|
||||
int recv = 0;
|
||||
while (recv < chunkSize) {
|
||||
recv += _reader.Read(_chunk, recv, chunkSize - recv);
|
||||
}
|
||||
_pos = 0;
|
||||
if (Http11Response.ReadLine(_reader) != "")
|
||||
throw new IOException("Corrupted chunk received");
|
||||
}
|
||||
public override int Read(byte[] buffer, int offset, int count) {
|
||||
if (_chunk.Length == 0) return 0;
|
||||
int recv = 0;
|
||||
while (true) {
|
||||
if (count - recv <= _chunk.Length - _pos) break;
|
||||
Array.Copy(_chunk, _pos, buffer, recv, _chunk.Length - _pos);
|
||||
recv += _chunk.Length - _pos;
|
||||
ReadChunk();
|
||||
if (_chunk.Length == 0) return recv;
|
||||
}
|
||||
Array.Copy(_chunk, _pos, buffer, recv, count - recv);
|
||||
return count;
|
||||
}
|
||||
public override byte[] ReadToEnd() {
|
||||
if (_chunk.Length == 0) return new byte[0];
|
||||
List<byte[]> segs = new();
|
||||
while (true) {
|
||||
if (_pos != 0) {
|
||||
var buffer = new byte[_chunk.Length - _pos];
|
||||
Array.Copy(_chunk, _pos, buffer, 0, buffer.Length);
|
||||
segs.Add(buffer);
|
||||
}
|
||||
else segs.Add(_chunk);
|
||||
ReadChunk();
|
||||
if (_chunk.Length == 0) {
|
||||
var result = new byte[segs.Sum(i => i.Length)];
|
||||
int p = 0;
|
||||
foreach (var i in segs) {
|
||||
Array.Copy(i, 0, result, p, i.Length);
|
||||
p += i.Length;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49a8d5b9869e5bb42bafbe71f84fecc5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Cryville.Common.Network.Http11 {
|
||||
public class Https11Client : Http11Client {
|
||||
readonly TlsClient _tlsClient;
|
||||
|
||||
protected override Stream Stream {
|
||||
get {
|
||||
return _tlsClient.Stream;
|
||||
}
|
||||
}
|
||||
protected override string WindowsProxyProtocolName {
|
||||
get {
|
||||
return "https";
|
||||
}
|
||||
}
|
||||
|
||||
public Https11Client(Uri baseUri) : base(baseUri, 443) {
|
||||
_tlsClient = new TlsClient(RawTcpStream, baseUri.Host);
|
||||
}
|
||||
|
||||
public override void Connect() {
|
||||
base.Connect();
|
||||
_tlsClient.Connect();
|
||||
}
|
||||
|
||||
public override void Close() {
|
||||
_tlsClient.Close();
|
||||
base.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5c233e6228ce204fa1a9724c48ac8fe
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,96 +0,0 @@
|
||||
using Org.BouncyCastle.Security;
|
||||
using Org.BouncyCastle.Tls;
|
||||
using Org.BouncyCastle.Tls.Crypto;
|
||||
using Org.BouncyCastle.Tls.Crypto.Impl.BC;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BcTlsClient = Org.BouncyCastle.Tls.TlsClient;
|
||||
|
||||
namespace Cryville.Common.Network {
|
||||
public class TlsClient : IDisposable {
|
||||
readonly TlsClientProtocol _protocol;
|
||||
readonly BcTlsClient _tlsClient;
|
||||
public Stream Stream { get; private set; }
|
||||
public TlsClient(Stream baseStream, string hostname) {
|
||||
_protocol = new TlsClientProtocol(baseStream);
|
||||
_tlsClient = new InternalTlsClient(hostname, new BcTlsCrypto(new SecureRandom()));
|
||||
}
|
||||
|
||||
public void Connect() {
|
||||
_protocol.Connect(_tlsClient);
|
||||
Stream = _protocol.Stream;
|
||||
}
|
||||
|
||||
public void Close() {
|
||||
_protocol.Close();
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public virtual void Dispose(bool disposing) {
|
||||
if (disposing) {
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTlsClient : DefaultTlsClient {
|
||||
readonly string _host;
|
||||
|
||||
public InternalTlsClient(string host, TlsCrypto crypto) : base(crypto) {
|
||||
_host = host;
|
||||
}
|
||||
|
||||
protected override ProtocolVersion[] GetSupportedVersions() {
|
||||
return ProtocolVersion.TLSv13.DownTo(ProtocolVersion.TLSv12);
|
||||
}
|
||||
|
||||
protected override IList GetProtocolNames() {
|
||||
IList list = new ArrayList {
|
||||
ProtocolName.Http_1_1
|
||||
};
|
||||
return list;
|
||||
}
|
||||
|
||||
private static readonly int[] supportedCipherSuites = {
|
||||
CipherSuite.TLS_AES_128_GCM_SHA256,
|
||||
CipherSuite.TLS_AES_256_GCM_SHA384,
|
||||
CipherSuite.TLS_CHACHA20_POLY1305_SHA256,
|
||||
CipherSuite.TLS_AES_128_CCM_SHA256,
|
||||
CipherSuite.TLS_AES_128_CCM_8_SHA256,
|
||||
};
|
||||
protected override int[] GetSupportedCipherSuites() {
|
||||
return base.GetSupportedCipherSuites().Union(supportedCipherSuites).ToArray();
|
||||
}
|
||||
|
||||
protected override IList GetSupportedSignatureAlgorithms() {
|
||||
var result = base.GetSupportedSignatureAlgorithms();
|
||||
result.Add(SignatureAndHashAlgorithm.ecdsa_brainpoolP256r1tls13_sha256);
|
||||
result.Add(SignatureAndHashAlgorithm.ecdsa_brainpoolP384r1tls13_sha384);
|
||||
result.Add(SignatureAndHashAlgorithm.ecdsa_brainpoolP512r1tls13_sha512);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected override IList GetSniServerNames() {
|
||||
return new ArrayList { new ServerName(0, Encoding.ASCII.GetBytes(_host)) };
|
||||
}
|
||||
|
||||
public override TlsAuthentication GetAuthentication() {
|
||||
return new NullTlsAuthentication();
|
||||
}
|
||||
}
|
||||
|
||||
private class NullTlsAuthentication : TlsAuthentication {
|
||||
public TlsCredentials GetClientCredentials(CertificateRequest certificateRequest) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void NotifyServerCertificate(TlsServerCertificate serverCertificate) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9c242bb90fc1cc479a8df1407f21940
|
||||
timeCreated: 1622021660
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -19,6 +19,7 @@ using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
@@ -47,6 +48,8 @@ namespace Cryville.Crtr {
|
||||
static FileStream _logFileStream;
|
||||
static StreamLoggerListener _logWriter;
|
||||
|
||||
public static string UnityUserAgent { get; private set; }
|
||||
|
||||
static bool _init;
|
||||
public static void Init() {
|
||||
if (_init) return;
|
||||
@@ -124,18 +127,19 @@ namespace Cryville.Crtr {
|
||||
#error No FFmpeg search path.
|
||||
#endif
|
||||
|
||||
var audioEngineBuilder = new EngineBuilder();
|
||||
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
|
||||
EngineBuilder.Engines.Add(typeof(Audio.Wasapi.MMDeviceEnumeratorWrapper));
|
||||
EngineBuilder.Engines.Add(typeof(Audio.WaveformAudio.WaveDeviceManager));
|
||||
audioEngineBuilder.Engines.Add(typeof(Audio.Wasapi.MMDeviceEnumeratorWrapper));
|
||||
audioEngineBuilder.Engines.Add(typeof(Audio.WaveformAudio.WaveDeviceManager));
|
||||
#elif UNITY_ANDROID
|
||||
EngineBuilder.Engines.Add(typeof(Audio.AAudio.AAudioManager));
|
||||
EngineBuilder.Engines.Add(typeof(Audio.OpenSLES.Engine));
|
||||
audioEngineBuilder.Engines.Add(typeof(Audio.AAudio.AAudioManager));
|
||||
audioEngineBuilder.Engines.Add(typeof(Audio.OpenSLES.Engine));
|
||||
#else
|
||||
#error No audio engine defined.
|
||||
#endif
|
||||
while (true) {
|
||||
try {
|
||||
AudioManager = EngineBuilder.Create();
|
||||
AudioManager = audioEngineBuilder.Create();
|
||||
if (AudioManager == null) {
|
||||
Dialog.Show(null, "Fatal error: Cannot initialize audio engine");
|
||||
MainLogger.Log(5, "Audio", "Cannot initialize audio engine");
|
||||
@@ -160,7 +164,7 @@ namespace Cryville.Crtr {
|
||||
Dialog.Show(null, "An error occurred while trying to initialize the recommended audio engine\nTrying to use fallback audio engines");
|
||||
MainLogger.Log(4, "Audio", "An error occurred when initializing the audio engine: {0}", ex);
|
||||
MainLogger.Log(2, "Audio", "Trying to use fallback audio engines");
|
||||
EngineBuilder.Engines.Remove(AudioManager.GetType());
|
||||
audioEngineBuilder.Engines.Remove(AudioManager.GetType());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,6 +180,32 @@ namespace Cryville.Crtr {
|
||||
Settings.Default.LastRunVersion = Application.version;
|
||||
Settings.Default.Save();
|
||||
|
||||
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
|
||||
UnityUserAgent = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"CosmoResona/{0} (Windows NT {1}; {2})",
|
||||
Application.version,
|
||||
Environment.OSVersion.Version,
|
||||
RuntimeInformation.OSArchitecture.ToString().ToLowerInvariant()
|
||||
);
|
||||
#elif UNITY_ANDROID
|
||||
var androidClassBuildVersion = AndroidJNI.FindClass("android/os/Build$VERSION");
|
||||
var androidRelease = AndroidJNI.GetStaticStringField(androidClassBuildVersion, AndroidJNI.GetStaticFieldID(androidClassBuildVersion, "RELEASE", "Ljava/lang/String;"));
|
||||
var androidClassBuild = AndroidJNI.FindClass("android/os/Build");
|
||||
var androidModel = AndroidJNI.GetStaticStringField(androidClassBuild, AndroidJNI.GetStaticFieldID(androidClassBuild, "MODEL", "Ljava/lang/String;"));
|
||||
var androidID = AndroidJNI.GetStaticStringField(androidClassBuild, AndroidJNI.GetStaticFieldID(androidClassBuild, "ID", "Ljava/lang/String;"));
|
||||
UnityUserAgent = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"CosmoResona/{0} (Linux; Android {1}; {2} Build/{3})",
|
||||
Application.version,
|
||||
androidRelease ?? "12.0.99",
|
||||
androidModel,
|
||||
androidID
|
||||
);
|
||||
#else
|
||||
#error No Unity User Agent
|
||||
#endif
|
||||
|
||||
MainLogger.Log(1, "UI", "Initializing font manager");
|
||||
foreach (var res in Resources.LoadAll<TextAsset>("cldr/common/validity")) {
|
||||
IdValidity.Load(LoadXmlDocument(res));
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Cryville.Common;
|
||||
using Cryville.Common.Network.Http11;
|
||||
using Cryville.Common.Unity;
|
||||
using Cryville.Crtr.UI;
|
||||
using Newtonsoft.Json;
|
||||
@@ -7,6 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
#if UNITY_STANDALONE_WIN && !UNITY_EDITOR
|
||||
using System.Runtime.InteropServices;
|
||||
#endif
|
||||
@@ -46,10 +46,10 @@ namespace Cryville.Crtr.Network {
|
||||
}
|
||||
}
|
||||
void CheckVersion() {
|
||||
using (var client = new Https11Client(BaseUri)) {
|
||||
client.Connect();
|
||||
using var response = client.Request("GET", new Uri(BaseUri, "versions"));
|
||||
var data = Encoding.UTF8.GetString(response.MessageBody.ReadToEnd());
|
||||
using (var client = new HttpClient()) {
|
||||
client.DefaultRequestHeaders.UserAgent.ParseAdd(Game.UnityUserAgent);
|
||||
using var response = client.GetAsync(new Uri(BaseUri, "versions")).Result;
|
||||
var data = response.Content.ReadAsStringAsync().Result;
|
||||
_versions = JsonConvert.DeserializeObject<List<VersionInfo>>(data, Game.GlobalJsonSerializerSettings);
|
||||
}
|
||||
var availableVersions = _versions.Where(v => v.platforms.ContainsKey(PlatformConfig.Name)).ToArray();
|
||||
@@ -131,12 +131,12 @@ namespace Cryville.Crtr.Network {
|
||||
}
|
||||
void Download(VersionResourceInfo diff, string path) {
|
||||
var uri = new Uri(diff.url);
|
||||
using var client = new Https11Client(uri);
|
||||
client.Connect();
|
||||
using var response = client.Request("GET", uri);
|
||||
var data = response.MessageBody.ReadToEnd();
|
||||
using var client = new HttpClient();
|
||||
client.DefaultRequestHeaders.UserAgent.ParseAdd(Game.UnityUserAgent);
|
||||
using var response = client.GetAsync(uri).Result;
|
||||
using var stream = response.Content.ReadAsStreamAsync().Result;
|
||||
using var file = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None);
|
||||
file.Write(data);
|
||||
stream.CopyTo(file);
|
||||
}
|
||||
void ExecuteUpdate(List<string> diffPaths) {
|
||||
#if UNITY_EDITOR
|
||||
|
||||
Binary file not shown.
@@ -43,9 +43,6 @@
|
||||
An <see cref="T:Cryville.Audio.AudioClient" /> that interacts with AAudio.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.AAudio.AAudioStream.Dispose(System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.AAudio.AAudioStream.Device">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
@@ -58,6 +55,9 @@
|
||||
<member name="P:Cryville.Audio.AAudio.AAudioStream.MaximumLatency">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.AAudio.AAudioStream.Status">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.AAudio.AAudioStream.Position">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
@@ -70,6 +70,9 @@
|
||||
<member name="M:Cryville.Audio.AAudio.AAudioStream.Pause">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.AAudio.AAudioStream.Close">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.AAudio.AAudioStreamBuilder">
|
||||
<summary>
|
||||
An <see cref="T:Cryville.Audio.IAudioDevice" /> that interacts with AAudio.
|
||||
@@ -109,73 +112,73 @@
|
||||
<member name="P:Cryville.Audio.AAudio.AAudioStreamBuilder.DefaultFormat">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.AAudio.AAudioStreamBuilder.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.AAudio.AAudioStreamBuilder.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.AAudio.AAudioStreamBuilder.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.AAudio.AAudioStreamBuilder.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setAllowedCapturePolicy(System.IntPtr,Android.AAudio.Native.aaudio_allowed_capture_policy_t)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setAllowedCapturePolicy(System.IntPtr,Cryville.Audio.AAudio.Native.aaudio_allowed_capture_policy_t)">
|
||||
<remarks>Available since API level 29.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setAttributionTag(System.IntPtr,System.String)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setAttributionTag(System.IntPtr,System.String)">
|
||||
<remarks>Available since API level 31.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setChannelMask(System.IntPtr,Android.AAudio.Native.aaudio_channel_mask_t)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setChannelMask(System.IntPtr,Cryville.Audio.AAudio.Native.aaudio_channel_mask_t)">
|
||||
<remarks>Available since API level 32.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setContentType(System.IntPtr,Android.AAudio.Native.aaudio_content_type_t)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setContentType(System.IntPtr,Cryville.Audio.AAudio.Native.aaudio_content_type_t)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setInputPreset(System.IntPtr,Android.AAudio.Native.aaudio_input_preset_t)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setInputPreset(System.IntPtr,Cryville.Audio.AAudio.Native.aaudio_input_preset_t)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setIsContentSpatialized(System.IntPtr,System.Boolean)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setIsContentSpatialized(System.IntPtr,System.Boolean)">
|
||||
<remarks>Available since API level 32.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setPackageName(System.IntPtr,System.String)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setPackageName(System.IntPtr,System.String)">
|
||||
<remarks>Available since API level 31.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setPrivacySensitive(System.IntPtr,System.Boolean)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setPrivacySensitive(System.IntPtr,System.Boolean)">
|
||||
<remarks>Available since API level 30.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setSessionId(System.IntPtr,Android.AAudio.Native.aaudio_session_id_t)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setSessionId(System.IntPtr,Cryville.Audio.AAudio.Native.aaudio_session_id_t)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setSpatializationBehavior(System.IntPtr,Android.AAudio.Native.aaudio_spatialization_behavior_t)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setSpatializationBehavior(System.IntPtr,Cryville.Audio.AAudio.Native.aaudio_spatialization_behavior_t)">
|
||||
<remarks>Available since API level 32.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setUsage(System.IntPtr,Android.AAudio.Native.aaudio_usage_t)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStreamBuilder_setUsage(System.IntPtr,Cryville.Audio.AAudio.Native.aaudio_usage_t)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_getAllowedCapturePolicy(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_getAllowedCapturePolicy(System.IntPtr)">
|
||||
<remarks>Available since API level 29.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_getChannelMask(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_getChannelMask(System.IntPtr)">
|
||||
<remarks>Available since API level 32.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_getContentType(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_getContentType(System.IntPtr)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_getInputPreset(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_getInputPreset(System.IntPtr)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_getSessionId(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_getSessionId(System.IntPtr)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_getSpatializationBehavior(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_getSpatializationBehavior(System.IntPtr)">
|
||||
<remarks>Available since API level 32.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_getUsage(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_getUsage(System.IntPtr)">
|
||||
<remarks>Available since API level 28.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_isContentSpatialized(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_isContentSpatialized(System.IntPtr)">
|
||||
<remarks>Available since API level 32.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_isPrivacySensitive(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_isPrivacySensitive(System.IntPtr)">
|
||||
<remarks>Available since API level 30.</remarks>
|
||||
</member>
|
||||
<member name="M:Android.AAudio.Native.UnsafeNativeMethods.AAudioStream_release(System.IntPtr)">
|
||||
<member name="M:Cryville.Audio.AAudio.Native.UnsafeNativeMethods.AAudioStream_release(System.IntPtr)">
|
||||
<remarks>Available since API level 30.</remarks>
|
||||
</member>
|
||||
</members>
|
||||
|
||||
Binary file not shown.
@@ -32,17 +32,41 @@
|
||||
<member name="M:Cryville.Audio.OpenSLES.Engine.GetDevices(Cryville.Audio.DataFlow)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.OpenSLES.OpenSLException">
|
||||
<summary>
|
||||
Exception occurring in OpenSL ES.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class.
|
||||
</summary>
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor(System.String,System.Exception)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class.
|
||||
</summary>
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
<param name="innerException">The exception that is the cause of the current exception.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.OpenSLES.OutputClient">
|
||||
<summary>
|
||||
An <see cref="T:Cryville.Audio.AudioClient" /> that interacts with OpenSL ES.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputClient.Finalize">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputClient.Dispose(System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.OpenSLES.OutputClient.Device">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
@@ -55,16 +79,22 @@
|
||||
<member name="P:Cryville.Audio.OpenSLES.OutputClient.MaximumLatency">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.OpenSLES.OutputClient.Status">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.OpenSLES.OutputClient.Position">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.OpenSLES.OutputClient.BufferPosition">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputClient.Start">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputClient.Pause">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputClient.Start">
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputClient.Close">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.OpenSLES.OutputDevice">
|
||||
@@ -102,41 +132,11 @@
|
||||
<member name="P:Cryville.Audio.OpenSLES.OutputDevice.DefaultFormat">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputDevice.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputDevice.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputDevice.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.OpenSLES.OutputDevice.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.OpenSLES.OpenSLException">
|
||||
<summary>
|
||||
Exception occurring in OpenSL ES.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class.
|
||||
</summary>
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor(System.String,System.Exception)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class.
|
||||
</summary>
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
<param name="innerException">The exception that is the cause of the current exception.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.OpenSLES.OpenSLException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.OpenSLES.OpenSLException" /> class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1,145 +1,135 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Cryville.Audio.Source.Libav</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Cryville.Audio.Source.Libav.LibavFileAudioSource">
|
||||
<summary>
|
||||
一个使用 Libav 解流并解码音频文件的 <see cref="T:Cryville.Audio.AudioStream" />。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.#ctor(System.String)">
|
||||
<summary>
|
||||
创建一个 <see cref="T:Cryville.Audio.Source.Libav.LibavFileAudioSource" /> 类的实例并加载指定的 <paramref name="file" />。
|
||||
</summary>
|
||||
<param name="file">音频文件。</param>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Disposed">
|
||||
<summary>
|
||||
该音频流是否已被释放。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Dispose(System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.EndOfData">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.BestStreamIndex">
|
||||
<summary>
|
||||
最佳音频流的索引。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Streams">
|
||||
<summary>
|
||||
所有音频流的索引集。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SelectStream">
|
||||
<summary>
|
||||
选择最佳音频流作为音频源。
|
||||
</summary>
|
||||
<exception cref="T:System.InvalidOperationException">已选择音频流。</exception>
|
||||
<remarks>
|
||||
<para>
|
||||
该方法只能在 <see cref="M:Cryville.Audio.AudioStream.SetFormat(Cryville.Audio.WaveFormat,System.Int32)" /> 被调用前调用,后者会在设置 <see cref="P:Cryville.Audio.AudioClient.Source" /> 时被调用。
|
||||
</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SelectStream(System.Int32)">
|
||||
<summary>
|
||||
选择一个音频流作为音频源。
|
||||
</summary>
|
||||
<param name="index">音频流的索引。</param>
|
||||
<exception cref="T:System.InvalidOperationException">已选择音频流。</exception>
|
||||
<remarks>
|
||||
<para>
|
||||
该方法只能在 <see cref="M:Cryville.Audio.AudioStream.SetFormat(Cryville.Audio.WaveFormat,System.Int32)" /> 被调用前调用,后者会在设置 <see cref="P:Cryville.Audio.AudioClient.Source" /> 时被调用。
|
||||
</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.GetStreamDuration(System.Int32)">
|
||||
<summary>
|
||||
获取一个流或当前文件的时长。
|
||||
</summary>
|
||||
<param name="streamId">
|
||||
流索引。如果指定 <c>-1</c> 则返回文件的时长。
|
||||
</param>
|
||||
<returns>时长(秒)。</returns>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.IsFormatSupported(Cryville.Audio.WaveFormat)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.OnSetFormat">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Read(System.Byte[],System.Int32,System.Int32)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Seek(System.Int64,System.IO.SeekOrigin)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SeekTime(System.Double,System.IO.SeekOrigin)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.CanRead">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.CanSeek">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.CanWrite">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Length">
|
||||
<inheritdoc />
|
||||
<remarks>
|
||||
<para>该属性可能不准确。</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Duration">
|
||||
<inheritdoc />
|
||||
<remarks>
|
||||
<para>该属性可能不准确。</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Time">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Position">
|
||||
<inheritdoc />
|
||||
<remarks>
|
||||
<para>
|
||||
该属性在调用 <see cref="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Seek(System.Int64,System.IO.SeekOrigin)" /> 后可能不准确。
|
||||
</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Flush">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SetLength(System.Int64)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Write(System.Byte[],System.Int32,System.Int32)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.Source.Libav.LibavException">
|
||||
<summary>
|
||||
Libav 抛出的异常。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor(System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor(System.String,System.Exception)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
</members>
|
||||
<assembly>
|
||||
<name>Cryville.Audio.Source.Libav</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Cryville.Audio.Source.Libav.LibavFileAudioSource">
|
||||
<summary>
|
||||
An <see cref="T:Cryville.Audio.AudioStream" /> that uses Libav to demux and decode audio files.
|
||||
</summary>
|
||||
<param name="file">The audio file.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.#ctor(System.String)">
|
||||
<summary>
|
||||
An <see cref="T:Cryville.Audio.AudioStream" /> that uses Libav to demux and decode audio files.
|
||||
</summary>
|
||||
<param name="file">The audio file.</param>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Disposed">
|
||||
<summary>
|
||||
Whether this audio stream has been disposed.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Dispose(System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.EndOfData">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.FrameLength">
|
||||
<inheritdoc />
|
||||
<remarks>
|
||||
<para>This property may be inaccurate.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.TimeLength">
|
||||
<inheritdoc />
|
||||
<remarks>
|
||||
<para>This property may be inaccurate.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.TimePosition">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.BestStreamIndex">
|
||||
<summary>
|
||||
The index to the best audio stream.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.Streams">
|
||||
<summary>
|
||||
The collection of indices to all audio streams.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SelectStream">
|
||||
<summary>
|
||||
Selects the best stream as the source.
|
||||
</summary>
|
||||
<exception cref="T:System.InvalidOperationException">The stream has been selected.</exception>
|
||||
<remarks>
|
||||
<para>This method can only be called before <see cref="M:Cryville.Audio.AudioStream.SetFormat(Cryville.Audio.WaveFormat,System.Int32)" /> is called, which is called while setting <see cref="P:Cryville.Audio.AudioClient.Source" />.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SelectStream(System.Int32)">
|
||||
<summary>
|
||||
Selects a stream as the source.
|
||||
</summary>
|
||||
<param name="index">The index of the stream.</param>
|
||||
<exception cref="T:System.InvalidOperationException">The stream has been selected.</exception>
|
||||
<remarks>
|
||||
<para>This method can only be called before <see cref="M:Cryville.Audio.AudioStream.SetFormat(Cryville.Audio.WaveFormat,System.Int32)" /> is called, which is called while setting <see cref="P:Cryville.Audio.AudioClient.Source" />.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.GetStreamDuration(System.Int32)">
|
||||
<summary>
|
||||
Gets the duration of a stream or the file.
|
||||
</summary>
|
||||
<param name="streamId">The stream index. The duration of the file is retrieved if <c>-1</c> is specified.</param>
|
||||
<returns>The duration in seconds.</returns>
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.DefaultFormat">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.IsFormatSupported(Cryville.Audio.WaveFormat)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.OnSetFormat">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.ReadFramesInternal(System.Byte@,System.Int32)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SeekFrameInternal(System.Int64,System.IO.SeekOrigin)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SeekTimeInternal(System.Double,System.IO.SeekOrigin)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.CanRead">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.CanSeek">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Source.Libav.LibavFileAudioSource.CanWrite">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Flush">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.SetLength(System.Int64)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavFileAudioSource.Write(System.Byte[],System.Int32,System.Int32)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.Source.Libav.LibavException">
|
||||
<summary>
|
||||
The exception that is thrown by Libav.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor(System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor(System.String,System.Exception)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Source.Libav.LibavException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -75,11 +75,14 @@
|
||||
</summary>
|
||||
<typeparam name="TCategory">The category type.</typeparam>
|
||||
<typeparam name="TObject">The type of the objects in the pool.</typeparam>
|
||||
<param name="pool">The categorized pool.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Buffers.CategorizedPoolAccessor`2.#ctor(Cryville.Common.Buffers.CategorizedPool{`0,`1})">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Common.Buffers.CategorizedPoolAccessor`2" /> class.
|
||||
A utility to access a categorized pool, representing a single unit that uses a shared categorized pool.
|
||||
</summary>
|
||||
<typeparam name="TCategory">The category type.</typeparam>
|
||||
<typeparam name="TObject">The type of the objects in the pool.</typeparam>
|
||||
<param name="pool">The categorized pool.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Buffers.CategorizedPoolAccessor`2.Rent(`0)">
|
||||
@@ -136,11 +139,13 @@
|
||||
A resource pool that allows reusing instances of type <typeparamref name="T" />.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the objects in the pool.</typeparam>
|
||||
<param name="capacity">The capacity of the pool.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Buffers.ObjectPool`1.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Common.Buffers.ObjectPool`1" /> class.
|
||||
A resource pool that allows reusing instances of type <typeparamref name="T" />.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the objects in the pool.</typeparam>
|
||||
<param name="capacity">The capacity of the pool.</param>
|
||||
</member>
|
||||
<member name="P:Cryville.Common.Buffers.ObjectPool`1.RentedCount">
|
||||
@@ -177,11 +182,13 @@
|
||||
A resource pool that allows reusing instances of type <typeparamref name="T" />, which has a parameterless constructor.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the objects in the pool.</typeparam>
|
||||
<param name="capacity">The capacity of the pool.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Buffers.SimpleObjectPool`1.#ctor(System.Int32)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Cryville.Common.Buffers.SimpleObjectPool`1" /> class.
|
||||
A resource pool that allows reusing instances of type <typeparamref name="T" />, which has a parameterless constructor.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the objects in the pool.</typeparam>
|
||||
<param name="capacity">The capacity of the pool.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Buffers.SimpleObjectPool`1.Construct">
|
||||
@@ -192,7 +199,7 @@
|
||||
An auto-resized <see cref="T:System.Char" /> array as a variable-length string used as a target that is modified frequently.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="E:Cryville.Common.Buffers.TargetString.OnUpdate">
|
||||
<member name="E:Cryville.Common.Buffers.TargetString.Updated">
|
||||
<summary>
|
||||
Occurs when <see cref="M:Cryville.Common.Buffers.TargetString.Validate" /> is called if the string is invalidated.
|
||||
</summary>
|
||||
|
||||
Binary file not shown.
BIN
Assets/Plugins/Cryville.Common.Compat.dll
Normal file
BIN
Assets/Plugins/Cryville.Common.Compat.dll
Normal file
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 634b689196afdab46b00f0017dc9ffc4
|
||||
guid: 85184b92e2dc20f41a75ec58505b1444
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
74
Assets/Plugins/Cryville.Common.Compat.xml
Normal file
74
Assets/Plugins/Cryville.Common.Compat.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Cryville.Common.Compat</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:System.Runtime.CompilerServices.IsExternalInit">
|
||||
<summary>
|
||||
Marks a property setter as external-init.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Cryville.Common.Compat.LPUTF8StrMarshaler">
|
||||
<summary>
|
||||
Marshals a UTF-8 string to a .NET Framework string, and vice versa.
|
||||
</summary>
|
||||
<remarks>
|
||||
<para>This marshaler is used as a fallback as <c>UnmanagedType.LPUTF8Str</c> is not available before .NET Framework 4.7.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.LPUTF8StrMarshaler.GetInstance(System.String)">
|
||||
<summary>
|
||||
Returns an instance of the custom marshaler.
|
||||
</summary>
|
||||
<param name="cookie">String "cookie" parameter that can be used by the custom marshaler.</param>
|
||||
<returns>An instance of the custom marshaler.</returns>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.LPUTF8StrMarshaler.CleanUpManagedData(System.Object)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.LPUTF8StrMarshaler.CleanUpNativeData(System.IntPtr)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.LPUTF8StrMarshaler.GetNativeDataSize">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.LPUTF8StrMarshaler.MarshalManagedToNative(System.Object)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.LPUTF8StrMarshaler.MarshalNativeToManaged(System.IntPtr)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Common.Compat.ThrowHelper">
|
||||
<summary>
|
||||
Provides <see langword="static" /> methods for throwing common exceptions.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.ThrowHelper.ThrowIfNull(System.Object,System.String)">
|
||||
<summary>
|
||||
Throws an <see cref="T:System.ArgumentNullException" /> if <paramref name="argument" /> is <see langword="null" />.
|
||||
</summary>
|
||||
<param name="argument">The reference type argument to validate as non-null.</param>
|
||||
<param name="paramName">The name of the parameter with which <paramref name="argument" /> corresponds. If you omit this parameter, the name of <paramref name="argument" /> is used.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="argument" /> is <see langword="null" />.</exception>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.ThrowHelper.ThrowIfNullOrEmpty(System.String,System.String)">
|
||||
<summary>
|
||||
Throws an exception if <paramref name="argument" /> is <see langword="null" /> or empty.
|
||||
</summary>
|
||||
<param name="argument">The string argument to validate as non-<see langword="null" /> and non-empty.</param>
|
||||
<param name="paramName">The name of the parameter with which <paramref name="argument" /> corresponds.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="argument" /> is <see langword="null" />.</exception>
|
||||
<exception cref="T:System.ArgumentException"><paramref name="argument" /> is empty.</exception>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Compat.ThrowHelper.ThrowIfNullOrWhiteSpace(System.String,System.String)">
|
||||
<summary>
|
||||
Throws an exception if <paramref name="argument" /> is <see langword="null" />, empty, or consists only of white-space characters.
|
||||
</summary>
|
||||
<param name="argument">The string argument to validate.</param>
|
||||
<param name="paramName">The name of the parameter with which <paramref name="argument" /> corresponds.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="argument" /> is <see langword="null" />.</exception>
|
||||
<exception cref="T:System.ArgumentException"><paramref name="argument" /> is empty or consists only of white-space characters.</exception>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56d3e75e121507e40afa4831c28f514f
|
||||
guid: 8a0f58b64f161c247a8cc0e2da2a5552
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
Binary file not shown.
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Cryville.Common.Interop</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Cryville.Common.Interop.LPUTF8StrMarshaler">
|
||||
<summary>
|
||||
Marshals a UTF-8 string to a .NET Framework string, and vice versa.
|
||||
</summary>
|
||||
<remarks>
|
||||
<para>This marshaler is used as a fallback as <c>UnmanagedType.LPUTF8Str</c> does not exist before .NET Framework 4.7.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Interop.LPUTF8StrMarshaler.GetInstance(System.String)">
|
||||
<summary>
|
||||
Returns an instance of the custom marshaler.
|
||||
</summary>
|
||||
<param name="cookie">String "cookie" parameter that can be used by the custom marshaler.</param>
|
||||
<returns>An instance of the custom marshaler.</returns>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Interop.LPUTF8StrMarshaler.CleanUpManagedData(System.Object)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Interop.LPUTF8StrMarshaler.CleanUpNativeData(System.IntPtr)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Interop.LPUTF8StrMarshaler.GetNativeDataSize">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Interop.LPUTF8StrMarshaler.MarshalManagedToNative(System.Object)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Interop.LPUTF8StrMarshaler.MarshalNativeToManaged(System.IntPtr)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Common.Interop.MonoPInvokeCallbackAttribute">
|
||||
<summary>
|
||||
Attribute used to annotate functions that will be called back from the unmanaged world.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Binary file not shown.
@@ -16,6 +16,7 @@
|
||||
<typeparam name="T">The attribute type.</typeparam>
|
||||
<param name="type">The type containing the member with the specified attribute type.</param>
|
||||
<returns>The member with the specified attribute type in the specified type. <see langword="null" /> when the member is not found or multiple members are found.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Reflection.FieldLikeHelper.GetMember(System.Type,System.String)">
|
||||
<summary>
|
||||
@@ -24,6 +25,7 @@
|
||||
<param name="type">The type.</param>
|
||||
<param name="name">The name of the member.</param>
|
||||
<returns>The member. <see langword="null" /> when the member is not found or multiple members are found.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Reflection.FieldLikeHelper.GetMemberType(System.Reflection.MemberInfo)">
|
||||
<summary>
|
||||
@@ -79,6 +81,7 @@
|
||||
</summary>
|
||||
<param name="type">The type.</param>
|
||||
<returns>A simple name of the class.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Reflection.TypeNameHelper.GetNamespaceQualifiedName(System.Type)">
|
||||
<summary>
|
||||
@@ -86,6 +89,7 @@
|
||||
</summary>
|
||||
<param name="type">The type.</param>
|
||||
<returns>The namespace qualified name of the class.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="type" /> is <see langword="null" />.</exception>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
BIN
Assets/Plugins/Cryville.Interop.Mono.dll
Normal file
BIN
Assets/Plugins/Cryville.Interop.Mono.dll
Normal file
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da0f60bce5e225e4fb5bfcdc1bb64f66
|
||||
guid: b77d8642f0f45ee42a9b7fb8e6598782
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
29
Assets/Plugins/Cryville.Interop.Mono.xml
Normal file
29
Assets/Plugins/Cryville.Interop.Mono.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Cryville.Interop.Mono</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Cryville.Interop.Mono.MonoPInvokeCallbackAttribute">
|
||||
<summary>
|
||||
Attribute used to annotate functions that will be called back from the unmanaged world.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.Interop.Mono.MonoPInvokeCallbackAttribute.DelegateType">
|
||||
<summary>
|
||||
The type of the delegate that will be calling us back.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Interop.Mono.MonoPInvokeCallbackAttribute.#ctor">
|
||||
<summary>
|
||||
Constructor for the MonoPInvokeCallbackAttribute.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Interop.Mono.MonoPInvokeCallbackAttribute.#ctor(System.Type)">
|
||||
<summary>
|
||||
Constructor for the MonoPInvokeCallbackAttribute.
|
||||
</summary>
|
||||
<param name="delegateType">The type of the delegate that will be calling us back.</param>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,7 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a624371d4108614b9cdc4acca1499e2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
guid: 0c9e14f904ff5244ebdce8979d78fb48
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,6 +27,9 @@
|
||||
<member name="P:Cryville.Audio.Wasapi.AudioClientWrapper.MaximumLatency">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Wasapi.AudioClientWrapper.Status">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.Wasapi.AudioClientWrapper.Position">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
@@ -39,6 +42,9 @@
|
||||
<member name="M:Cryville.Audio.Wasapi.AudioClientWrapper.Pause">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.AudioClientWrapper.Close">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.Wasapi.MMDeviceEnumeratorWrapper">
|
||||
<summary>
|
||||
An <see cref="T:Cryville.Audio.IAudioDeviceManager" /> that interact with Wasapi.
|
||||
@@ -49,6 +55,15 @@
|
||||
Creates an instance of the <see cref="T:Cryville.Audio.Wasapi.MMDeviceEnumeratorWrapper" /> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceEnumeratorWrapper.Dispose">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceEnumeratorWrapper.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
||||
</summary>
|
||||
<param name="disposing">Whether the method is being called by user.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceEnumeratorWrapper.GetDevices(Cryville.Audio.DataFlow)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
@@ -60,6 +75,9 @@
|
||||
An <see cref="T:Cryville.Audio.IAudioDevice" /> that interacts with Wasapi.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceWrapper.Dispose">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceWrapper.Dispose(System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
@@ -86,10 +104,10 @@
|
||||
<member name="P:Cryville.Audio.Wasapi.MMDeviceWrapper.DefaultFormat">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceWrapper.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceWrapper.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceWrapper.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.Wasapi.MMDeviceWrapper.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
</members>
|
||||
|
||||
Binary file not shown.
@@ -4,36 +4,6 @@
|
||||
<name>Cryville.Audio.WaveformAudio</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Microsoft.Windows.MmSysCom.MultimediaSystemException">
|
||||
<summary>
|
||||
Exception occurring in Multimedia System.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class.
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor(System.String,System.Exception)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class.
|
||||
</summary>
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
<param name="innerException">The exception that is the cause of the current exception.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.WaveformAudio.WaveOutClient">
|
||||
<summary>
|
||||
An <see cref="T:Cryville.Audio.AudioClient" /> that interacts with WinMM.
|
||||
@@ -43,10 +13,7 @@
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveOutClient.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
||||
</summary>
|
||||
<param name="disposing">Whether the method is being called by user.</param>
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.WaveformAudio.WaveOutClient.Device">
|
||||
<inheritdoc />
|
||||
@@ -60,6 +27,9 @@
|
||||
<member name="P:Cryville.Audio.WaveformAudio.WaveOutClient.MaximumLatency">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.WaveformAudio.WaveOutClient.Status">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.Audio.WaveformAudio.WaveOutClient.Position">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
@@ -72,6 +42,9 @@
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveOutClient.Pause">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveOutClient.Close">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.WaveformAudio.WaveOutDevice">
|
||||
<summary>
|
||||
An <see cref="T:Cryville.Audio.IAudioDevice" /> that interacts with WinMM.
|
||||
@@ -107,10 +80,10 @@
|
||||
<member name="P:Cryville.Audio.WaveformAudio.WaveOutDevice.DefaultFormat">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveOutDevice.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveOutDevice.IsFormatSupported(Cryville.Audio.WaveFormat,System.Nullable{Cryville.Audio.WaveFormat}@,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveOutDevice.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioShareMode)">
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveOutDevice.Connect(Cryville.Audio.WaveFormat,System.Int32,Cryville.Audio.AudioUsage,Cryville.Audio.AudioShareMode)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.Audio.WaveformAudio.WaveDeviceManager">
|
||||
@@ -138,5 +111,35 @@
|
||||
<member name="M:Cryville.Audio.WaveformAudio.WaveDeviceManager.GetDevices(Cryville.Audio.DataFlow)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Microsoft.Windows.MmSysCom.MultimediaSystemException">
|
||||
<summary>
|
||||
Exception occurring in Multimedia System.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class.
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor(System.String,System.Exception)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class.
|
||||
</summary>
|
||||
<param name="message">The error message that explains the reason for the exception.</param>
|
||||
<param name="innerException">The exception that is the cause of the current exception.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Windows.MmSysCom.MultimediaSystemException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Creates an instance of the <see cref="T:Microsoft.Windows.MmSysCom.MultimediaSystemException" /> class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.focus-creative-games.hybridclr_unity": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
|
||||
"com.code-philosophy.hybridclr": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.ide.visualstudio": "2.0.22",
|
||||
"com.unity.ide.visualstudio": "2.0.23",
|
||||
"com.unity.nuget.newtonsoft-json": "3.2.1",
|
||||
"com.unity.ugui": "1.0.0",
|
||||
"com.unity.modules.androidjni": "1.0.0",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.focus-creative-games.hybridclr_unity": {
|
||||
"com.code-philosophy.hybridclr": {
|
||||
"version": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "c84f575a2ee4d26ac65028463b437604570dcc74"
|
||||
"hash": "59a3c3974a6e435e0ed57fb9af61fbbc6d17a8b7"
|
||||
},
|
||||
"com.unity.2d.sprite": {
|
||||
"version": "1.0.0",
|
||||
@@ -21,7 +21,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.visualstudio": {
|
||||
"version": "2.0.22",
|
||||
"version": "2.0.23",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user