diff --git a/api/Adrenak.UnityOpus.OpusLib.html b/api/Adrenak.UnityOpus.OpusLib.html index 2ecb9c2..019f42a 100644 --- a/api/Adrenak.UnityOpus.OpusLib.html +++ b/api/Adrenak.UnityOpus.OpusLib.html @@ -83,7 +83,8 @@

Class OpusLib

-
+

Provides interop calls to the Opus native libraries

+
Inheritance
@@ -125,7 +126,9 @@

Fields

maximumPacketDuration

-
+

The maximum duration (in milliseconds) of a single packet +of encoded audio data that the decoder can handle

+
Declaration
diff --git a/api/Adrenak.UnityOpus.html b/api/Adrenak.UnityOpus.html index 9d1f868..009ec05 100644 --- a/api/Adrenak.UnityOpus.html +++ b/api/Adrenak.UnityOpus.html @@ -94,7 +94,8 @@

Encoder

Represents an Opus encoder for encoding PCM data.

OpusLib

-
+

Provides interop calls to the Opus native libraries

+

Enums

ErrorCode

diff --git a/index.html b/index.html index 09c8f2e..bd4b50d 100644 --- a/index.html +++ b/index.html @@ -73,6 +73,7 @@

UnityOpus

Note: A UPM fork of UnityOps by TyounanMOTI with some XML comments. The original project is sponsored by Cluster, Inc.

+

Scripting reference

Contact 👥

@github
@website
@discord: adrenak#1934

diff --git a/index.json b/index.json index 890c112..7cf5eb1 100644 --- a/index.json +++ b/index.json @@ -17,7 +17,7 @@ "api/Adrenak.UnityOpus.html": { "href": "api/Adrenak.UnityOpus.html", "title": "Namespace Adrenak.UnityOpus | UnityOpus documentation", - "keywords": "Namespace Adrenak.UnityOpus Classes Decoder Represents an Opus decoder for decoding Opus-encoded data to PCM. Encoder Represents an Opus encoder for encoding PCM data. OpusLib Enums ErrorCode Represents error codes that may be returned by Opus functions. NumChannels Specifies the number of audio channels. OpusApplication Represents the target application for the Opus encoder. OpusSignal Specifies the signal type for the Opus encoder. SamplingFrequency Defines supported sampling frequencies for the Opus codec." + "keywords": "Namespace Adrenak.UnityOpus Classes Decoder Represents an Opus decoder for decoding Opus-encoded data to PCM. Encoder Represents an Opus encoder for encoding PCM data. OpusLib Provides interop calls to the Opus native libraries Enums ErrorCode Represents error codes that may be returned by Opus functions. NumChannels Specifies the number of audio channels. OpusApplication Represents the target application for the Opus encoder. OpusSignal Specifies the signal type for the Opus encoder. SamplingFrequency Defines supported sampling frequencies for the Opus codec." }, "api/Adrenak.UnityOpus.NumChannels.html": { "href": "api/Adrenak.UnityOpus.NumChannels.html", @@ -32,7 +32,7 @@ "api/Adrenak.UnityOpus.OpusLib.html": { "href": "api/Adrenak.UnityOpus.OpusLib.html", "title": "Class OpusLib | UnityOpus documentation", - "keywords": "Class OpusLib Inheritance System.Object OpusLib Inherited Members System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() Namespace : Adrenak.UnityOpus Assembly : cs.temp.dll.dll Syntax public class OpusLib Fields maximumPacketDuration Declaration public const int maximumPacketDuration = 5760 Field Value Type Description System.Int32 Methods OpusDecode(IntPtr, Byte[], Int32, Int16[], Int32, Int32) Decodes Opus data into PCM samples. Declaration public static extern int OpusDecode(IntPtr decoder, byte[] data, int len, short[] pcm, int frameSize, int decodeFec) Parameters Type Name Description System.IntPtr decoder A pointer to the Opus decoder instance. System.Byte [] data The input buffer containing encoded Opus data. System.Int32 len The length of the input buffer. System.Int16 [] pcm The output buffer for the decoded PCM samples (16-bit signed integers). System.Int32 frameSize The number of samples per frame. System.Int32 decodeFec Indicates if forward error correction (FEC) is enabled (0 or 1). Returns Type Description System.Int32 The number of decoded samples, or an error code if failed. OpusDecodeFloat(IntPtr, Byte[], Int32, Single[], Int32, Int32) Decodes Opus data into PCM samples in floating-point format. Declaration public static extern int OpusDecodeFloat(IntPtr decoder, byte[] data, int len, float[] pcm, int frameSize, int decodeFec) Parameters Type Name Description System.IntPtr decoder A pointer to the Opus decoder instance. System.Byte [] data The input buffer containing encoded Opus data. System.Int32 len The length of the input buffer. System.Single [] pcm The output buffer for the decoded PCM samples (32-bit floating-point). System.Int32 frameSize The number of samples per frame. System.Int32 decodeFec Indicates if forward error correction (FEC) is enabled (0 or 1). Returns Type Description System.Int32 The number of decoded samples, or an error code if failed. OpusDecoderCreate(SamplingFrequency, NumChannels, out ErrorCode) Creates a new Opus decoder instance. Declaration public static extern IntPtr OpusDecoderCreate(SamplingFrequency samplingFrequency, NumChannels channels, out ErrorCode error) Parameters Type Name Description SamplingFrequency samplingFrequency The sampling frequency to be used by the decoder. NumChannels channels The number of audio channels (mono or stereo). ErrorCode error Outputs an error code indicating success or failure. Returns Type Description System.IntPtr A pointer to the newly created Opus decoder instance. OpusDecoderDestroy(IntPtr) Destroys an Opus decoder instance, freeing its allocated resources. Declaration public static extern void OpusDecoderDestroy(IntPtr decoder) Parameters Type Name Description System.IntPtr decoder A pointer to the Opus decoder instance to be destroyed. OpusEncode(IntPtr, Int16[], Int32, Byte[], Int32) Encodes audio samples into Opus format. Declaration public static extern int OpusEncode(IntPtr encoder, short[] pcm, int frameSize, byte[] data, int maxDataBytes) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Int16 [] pcm The PCM audio samples to encode (16-bit signed integers). System.Int32 frameSize The number of samples per frame. System.Byte [] data The output buffer where the encoded data will be stored. System.Int32 maxDataBytes The maximum size of the output buffer in bytes. Returns Type Description System.Int32 The length of the encoded data in bytes, or an error code if failed. OpusEncodeFloat(IntPtr, Single[], Int32, Byte[], Int32) Encodes audio samples in floating-point format into Opus format. Declaration public static extern int OpusEncodeFloat(IntPtr encoder, float[] pcm, int frameSize, byte[] data, int maxDataBytes) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Single [] pcm The PCM audio samples to encode (32-bit floating-point). System.Int32 frameSize The number of samples per frame. System.Byte [] data The output buffer where the encoded data will be stored. System.Int32 maxDataBytes The maximum size of the output buffer in bytes. Returns Type Description System.Int32 The length of the encoded data in bytes, or an error code if failed. OpusEncoderCreate(SamplingFrequency, NumChannels, OpusApplication, out ErrorCode) Creates a new Opus encoder instance. Declaration public static extern IntPtr OpusEncoderCreate(SamplingFrequency samplingFrequency, NumChannels channels, OpusApplication application, out ErrorCode error) Parameters Type Name Description SamplingFrequency samplingFrequency The sampling frequency to be used by the encoder (e.g., 48kHz). NumChannels channels The number of audio channels (mono or stereo). OpusApplication application The target application for the encoder (e.g., VoIP, Audio, or LowDelay). ErrorCode error Outputs an error code indicating success or failure. Returns Type Description System.IntPtr A pointer to the newly created Opus encoder instance. OpusEncoderDestroy(IntPtr) Destroys an Opus encoder instance, freeing its allocated resources. Declaration public static extern void OpusEncoderDestroy(IntPtr encoder) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance to be destroyed. OpusEncoderSetBitrate(IntPtr, Int32) Sets the bitrate of the Opus encoder. Declaration public static extern int OpusEncoderSetBitrate(IntPtr encoder, int bitrate) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Int32 bitrate The desired bitrate in bits per second (e.g., 64000 for 64kbps). Returns Type Description System.Int32 Returns 0 on success, or an error code otherwise. OpusEncoderSetComplexity(IntPtr, Int32) Sets the complexity of the Opus encoder. Declaration public static extern int OpusEncoderSetComplexity(IntPtr encoder, int complexity) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Int32 complexity The complexity level (0-10, where 10 is the highest quality). Returns Type Description System.Int32 Returns 0 on success, or an error code otherwise. OpusEncoderSetSignal(IntPtr, OpusSignal) Configures the encoder signal type (e.g., voice or music). Declaration public static extern int OpusEncoderSetSignal(IntPtr encoder, OpusSignal signal) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. OpusSignal signal The signal type, such as voice or music. Returns Type Description System.Int32 Returns 0 on success, or an error code otherwise. OpusPcmSoftClip(Single[], Int32, NumChannels, Single[]) Applies soft clipping to PCM samples to prevent distortion. Declaration public static extern void OpusPcmSoftClip(float[] pcm, int frameSize, NumChannels channels, float[] softclipMem) Parameters Type Name Description System.Single [] pcm The buffer containing PCM samples (32-bit floating-point). System.Int32 frameSize The number of samples per frame. NumChannels channels The number of audio channels. System.Single [] softclipMem A memory buffer for maintaining the soft clip state." + "keywords": "Class OpusLib Provides interop calls to the Opus native libraries Inheritance System.Object OpusLib Inherited Members System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() Namespace : Adrenak.UnityOpus Assembly : cs.temp.dll.dll Syntax public class OpusLib Fields maximumPacketDuration The maximum duration (in milliseconds) of a single packet of encoded audio data that the decoder can handle Declaration public const int maximumPacketDuration = 5760 Field Value Type Description System.Int32 Methods OpusDecode(IntPtr, Byte[], Int32, Int16[], Int32, Int32) Decodes Opus data into PCM samples. Declaration public static extern int OpusDecode(IntPtr decoder, byte[] data, int len, short[] pcm, int frameSize, int decodeFec) Parameters Type Name Description System.IntPtr decoder A pointer to the Opus decoder instance. System.Byte [] data The input buffer containing encoded Opus data. System.Int32 len The length of the input buffer. System.Int16 [] pcm The output buffer for the decoded PCM samples (16-bit signed integers). System.Int32 frameSize The number of samples per frame. System.Int32 decodeFec Indicates if forward error correction (FEC) is enabled (0 or 1). Returns Type Description System.Int32 The number of decoded samples, or an error code if failed. OpusDecodeFloat(IntPtr, Byte[], Int32, Single[], Int32, Int32) Decodes Opus data into PCM samples in floating-point format. Declaration public static extern int OpusDecodeFloat(IntPtr decoder, byte[] data, int len, float[] pcm, int frameSize, int decodeFec) Parameters Type Name Description System.IntPtr decoder A pointer to the Opus decoder instance. System.Byte [] data The input buffer containing encoded Opus data. System.Int32 len The length of the input buffer. System.Single [] pcm The output buffer for the decoded PCM samples (32-bit floating-point). System.Int32 frameSize The number of samples per frame. System.Int32 decodeFec Indicates if forward error correction (FEC) is enabled (0 or 1). Returns Type Description System.Int32 The number of decoded samples, or an error code if failed. OpusDecoderCreate(SamplingFrequency, NumChannels, out ErrorCode) Creates a new Opus decoder instance. Declaration public static extern IntPtr OpusDecoderCreate(SamplingFrequency samplingFrequency, NumChannels channels, out ErrorCode error) Parameters Type Name Description SamplingFrequency samplingFrequency The sampling frequency to be used by the decoder. NumChannels channels The number of audio channels (mono or stereo). ErrorCode error Outputs an error code indicating success or failure. Returns Type Description System.IntPtr A pointer to the newly created Opus decoder instance. OpusDecoderDestroy(IntPtr) Destroys an Opus decoder instance, freeing its allocated resources. Declaration public static extern void OpusDecoderDestroy(IntPtr decoder) Parameters Type Name Description System.IntPtr decoder A pointer to the Opus decoder instance to be destroyed. OpusEncode(IntPtr, Int16[], Int32, Byte[], Int32) Encodes audio samples into Opus format. Declaration public static extern int OpusEncode(IntPtr encoder, short[] pcm, int frameSize, byte[] data, int maxDataBytes) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Int16 [] pcm The PCM audio samples to encode (16-bit signed integers). System.Int32 frameSize The number of samples per frame. System.Byte [] data The output buffer where the encoded data will be stored. System.Int32 maxDataBytes The maximum size of the output buffer in bytes. Returns Type Description System.Int32 The length of the encoded data in bytes, or an error code if failed. OpusEncodeFloat(IntPtr, Single[], Int32, Byte[], Int32) Encodes audio samples in floating-point format into Opus format. Declaration public static extern int OpusEncodeFloat(IntPtr encoder, float[] pcm, int frameSize, byte[] data, int maxDataBytes) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Single [] pcm The PCM audio samples to encode (32-bit floating-point). System.Int32 frameSize The number of samples per frame. System.Byte [] data The output buffer where the encoded data will be stored. System.Int32 maxDataBytes The maximum size of the output buffer in bytes. Returns Type Description System.Int32 The length of the encoded data in bytes, or an error code if failed. OpusEncoderCreate(SamplingFrequency, NumChannels, OpusApplication, out ErrorCode) Creates a new Opus encoder instance. Declaration public static extern IntPtr OpusEncoderCreate(SamplingFrequency samplingFrequency, NumChannels channels, OpusApplication application, out ErrorCode error) Parameters Type Name Description SamplingFrequency samplingFrequency The sampling frequency to be used by the encoder (e.g., 48kHz). NumChannels channels The number of audio channels (mono or stereo). OpusApplication application The target application for the encoder (e.g., VoIP, Audio, or LowDelay). ErrorCode error Outputs an error code indicating success or failure. Returns Type Description System.IntPtr A pointer to the newly created Opus encoder instance. OpusEncoderDestroy(IntPtr) Destroys an Opus encoder instance, freeing its allocated resources. Declaration public static extern void OpusEncoderDestroy(IntPtr encoder) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance to be destroyed. OpusEncoderSetBitrate(IntPtr, Int32) Sets the bitrate of the Opus encoder. Declaration public static extern int OpusEncoderSetBitrate(IntPtr encoder, int bitrate) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Int32 bitrate The desired bitrate in bits per second (e.g., 64000 for 64kbps). Returns Type Description System.Int32 Returns 0 on success, or an error code otherwise. OpusEncoderSetComplexity(IntPtr, Int32) Sets the complexity of the Opus encoder. Declaration public static extern int OpusEncoderSetComplexity(IntPtr encoder, int complexity) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. System.Int32 complexity The complexity level (0-10, where 10 is the highest quality). Returns Type Description System.Int32 Returns 0 on success, or an error code otherwise. OpusEncoderSetSignal(IntPtr, OpusSignal) Configures the encoder signal type (e.g., voice or music). Declaration public static extern int OpusEncoderSetSignal(IntPtr encoder, OpusSignal signal) Parameters Type Name Description System.IntPtr encoder A pointer to the Opus encoder instance. OpusSignal signal The signal type, such as voice or music. Returns Type Description System.Int32 Returns 0 on success, or an error code otherwise. OpusPcmSoftClip(Single[], Int32, NumChannels, Single[]) Applies soft clipping to PCM samples to prevent distortion. Declaration public static extern void OpusPcmSoftClip(float[] pcm, int frameSize, NumChannels channels, float[] softclipMem) Parameters Type Name Description System.Single [] pcm The buffer containing PCM samples (32-bit floating-point). System.Int32 frameSize The number of samples per frame. NumChannels channels The number of audio channels. System.Single [] softclipMem A memory buffer for maintaining the soft clip state." }, "api/Adrenak.UnityOpus.OpusSignal.html": { "href": "api/Adrenak.UnityOpus.OpusSignal.html", @@ -47,6 +47,6 @@ "index.html": { "href": "index.html", "title": "UnityOpus | UnityOpus documentation", - "keywords": "UnityOpus Note: A UPM fork of UnityOps by TyounanMOTI with some XML comments. The original project is sponsored by Cluster, Inc. Contact 👥 @github @website @discord: adrenak#1934" + "keywords": "UnityOpus Note: A UPM fork of UnityOps by TyounanMOTI with some XML comments. The original project is sponsored by Cluster, Inc. Scripting reference Contact 👥 @github @website @discord: adrenak#1934" } } \ No newline at end of file diff --git a/manifest.json b/manifest.json index c13356b..903cef1 100644 --- a/manifest.json +++ b/manifest.json @@ -88,7 +88,7 @@ "output": { ".html": { "relative_path": "api/Adrenak.UnityOpus.OpusLib.html", - "hash": "BwI1xCQUYibf8N9xC4RNkwZDYHYIZVNhAl8SgQMJ//0=" + "hash": "vNZMIXuCn97jE9wwIzYOMMTD+HMWgpZvxdHAvipoPRs=" } }, "is_incremental": false, @@ -124,7 +124,7 @@ "output": { ".html": { "relative_path": "api/Adrenak.UnityOpus.html", - "hash": "vBOQUxrJ+YL1UueV4JuL9jRqUd9ofkivKWpYpHhCyhY=" + "hash": "dg6A9v32SYkNV6lyjOR/uOgVHOdwT4x811Gu+uRyC9U=" } }, "is_incremental": false, @@ -148,7 +148,7 @@ "output": { ".html": { "relative_path": "index.html", - "hash": "AcF3qJ1edkK9qefvBcCpD1LUdV0cf4SFGfw/AMpVQEs=" + "hash": "cf/8wx67GWvN13zD7HzIFJHUF32VAPVwzf++PcMEqCE=" } }, "is_incremental": false, diff --git a/sitemap.xml b/sitemap.xml index 8c5cfa5..2819abe 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,61 +2,61 @@ https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.Decoder.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.Encoder.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.ErrorCode.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.NumChannels.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.OpusApplication.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.OpusLib.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.OpusSignal.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.SamplingFrequency.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/api/Adrenak.UnityOpus.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 daily 0.5 https://adrenak.github.io/unityopus/index.html - 2024-12-18T12:42:17+00:00 + 2024-12-18T12:55:37+00:00 weekly 0.5