Skip to content

Commit

Permalink
deploy: 1f46319
Browse files Browse the repository at this point in the history
  • Loading branch information
adrenak committed Dec 18, 2024
1 parent effce9b commit b81bc45
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
7 changes: 5 additions & 2 deletions api/Adrenak.UnityOpus.OpusLib.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@

<h1 id="Adrenak_UnityOpus_OpusLib" data-uid="Adrenak.UnityOpus.OpusLib" class="text-break">Class OpusLib
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 summary"><p>Provides interop calls to the Opus native libraries</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
Expand Down Expand Up @@ -125,7 +126,9 @@ <h3 id="fields">Fields


<h4 id="Adrenak_UnityOpus_OpusLib_maximumPacketDuration" data-uid="Adrenak.UnityOpus.OpusLib.maximumPacketDuration">maximumPacketDuration</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 summary"><p>The maximum duration (in milliseconds) of a single packet
of encoded audio data that the decoder can handle</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
Expand Down
3 changes: 2 additions & 1 deletion api/Adrenak.UnityOpus.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ <h4><a class="xref" href="Adrenak.UnityOpus.Encoder.html">Encoder</a></h4>
<section><p>Represents an Opus encoder for encoding PCM data.</p>
</section>
<h4><a class="xref" href="Adrenak.UnityOpus.OpusLib.html">OpusLib</a></h4>
<section></section>
<section><p>Provides interop calls to the Opus native libraries</p>
</section>
<h3 id="enums">Enums
</h3>
<h4><a class="xref" href="Adrenak.UnityOpus.ErrorCode.html">ErrorCode</a></h4>
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<h2 id="unityopus">UnityOpus</h2>

<p>Note: A UPM fork of <a href="https://github.com/TyounanMOTI/UnityOpus">UnityOps by TyounanMOTI</a> with some XML comments. The original project is sponsored by Cluster, Inc. </p>
<p><a href="http://www.vatsalambastha.com/UnityOpus">Scripting reference</a></p>
<h2 id="contact-">Contact 👥</h2>
<p><a href="https://www.github.com/adrenak">@github</a><br><a href="http://www.vatsalambastha.com">@website</a><br>@discord: <code>adrenak#1934</code></p>
</article>
Expand Down
6 changes: 3 additions & 3 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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"
}
}
6 changes: 3 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"output": {
".html": {
"relative_path": "api/Adrenak.UnityOpus.OpusLib.html",
"hash": "BwI1xCQUYibf8N9xC4RNkwZDYHYIZVNhAl8SgQMJ//0="
"hash": "vNZMIXuCn97jE9wwIzYOMMTD+HMWgpZvxdHAvipoPRs="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -124,7 +124,7 @@
"output": {
".html": {
"relative_path": "api/Adrenak.UnityOpus.html",
"hash": "vBOQUxrJ+YL1UueV4JuL9jRqUd9ofkivKWpYpHhCyhY="
"hash": "dg6A9v32SYkNV6lyjOR/uOgVHOdwT4x811Gu+uRyC9U="
}
},
"is_incremental": false,
Expand All @@ -148,7 +148,7 @@
"output": {
".html": {
"relative_path": "index.html",
"hash": "AcF3qJ1edkK9qefvBcCpD1LUdV0cf4SFGfw/AMpVQEs="
"hash": "cf/8wx67GWvN13zD7HzIFJHUF32VAPVwzf++PcMEqCE="
}
},
"is_incremental": false,
Expand Down
Loading

0 comments on commit b81bc45

Please sign in to comment.