Skip to content

Commit f7b1425

Browse files
Merge pull request #43 from AvionBlock/dev
v1.6.4 Release
2 parents 03e4cdd + 8b279ee commit f7b1425

12 files changed

Lines changed: 155 additions & 76 deletions

File tree

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
3-
<OpusSharpVersion>1.6.3</OpusSharpVersion>
4-
<OpusSharpCoreVersion>1.6.0.3</OpusSharpCoreVersion>
5-
<OpusSharpNativesVersion>1.6.0.2</OpusSharpNativesVersion>
3+
<OpusSharpVersion>1.6.4</OpusSharpVersion>
4+
<OpusSharpCoreVersion>1.6.1.0</OpusSharpCoreVersion>
5+
<OpusSharpNativesVersion>1.6.1.0</OpusSharpNativesVersion>
66
<PackageProjectUrl>https://avionblock.github.io/OpusSharp/index.html</PackageProjectUrl>
77
<RepositoryUrl>https://github.com/AvionBlock/OpusSharp</RepositoryUrl>
88
</PropertyGroup>

OpusSharp.Core/Extensions/OpusDecoderExtensions.cs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using OpusSharp.Core.Interfaces;
23

34
namespace OpusSharp.Core.Extensions
45
{
@@ -15,7 +16,7 @@ public static class OpusDecoderExtensions
1516
/// <param name="gain">The gain to set.</param>
1617
/// <exception cref="OpusException" />
1718
/// <exception cref="ObjectDisposedException" />
18-
public static void SetGain(this OpusDecoder decoder, short gain)
19+
public static void SetGain(this IOpusDecoder decoder, short gain)
1920
{
2021
decoder.Ctl(DecoderCTL.OPUS_SET_GAIN, gain);
2122
}
@@ -27,7 +28,7 @@ public static void SetGain(this OpusDecoder decoder, short gain)
2728
/// <returns>The gain for the opus decoder.</returns>
2829
/// <exception cref="OpusException" />
2930
/// <exception cref="ObjectDisposedException" />
30-
public static int GetGain(this OpusDecoder decoder)
31+
public static int GetGain(this IOpusDecoder decoder)
3132
{
3233
var gain = 0;
3334
decoder.Ctl(DecoderCTL.OPUS_GET_GAIN, ref gain);
@@ -41,7 +42,7 @@ public static int GetGain(this OpusDecoder decoder)
4142
/// <returns>The last packet duration (in samples).</returns>
4243
/// <exception cref="OpusException" />
4344
/// <exception cref="ObjectDisposedException" />
44-
public static int GetLastPacketDuration(this OpusDecoder decoder)
45+
public static int GetLastPacketDuration(this IOpusDecoder decoder)
4546
{
4647
var lastPacketDuration = 0;
4748
decoder.Ctl(DecoderCTL.OPUS_GET_LAST_PACKET_DURATION, ref lastPacketDuration);
@@ -55,7 +56,7 @@ public static int GetLastPacketDuration(this OpusDecoder decoder)
5556
/// <returns>The pitch of the last decoded frame if available.</returns>
5657
/// <exception cref="OpusException" />
5758
/// <exception cref="ObjectDisposedException" />
58-
public static int GetPitch(this OpusDecoder decoder)
59+
public static int GetPitch(this IOpusDecoder decoder)
5960
{
6061
var pitch = 0;
6162
decoder.Ctl(DecoderCTL.OPUS_GET_PITCH, ref pitch);
@@ -69,7 +70,7 @@ public static int GetPitch(this OpusDecoder decoder)
6970
/// <param name="enabled">Whether to enable or disable the OSCE BWE module.</param>
7071
/// <exception cref="OpusException" />
7172
/// <exception cref="ObjectDisposedException" />
72-
public static void SetOsceBwe(this OpusDecoder decoder, bool enabled)
73+
public static void SetOsceBwe(this IOpusDecoder decoder, bool enabled)
7374
{
7475
decoder.Ctl(DecoderCTL.OPUS_SET_OSCE_BWE, enabled ? 1 : 0);
7576
}
@@ -81,7 +82,7 @@ public static void SetOsceBwe(this OpusDecoder decoder, bool enabled)
8182
/// <returns>Whether the OSCE BWE module is enabled or not.</returns>
8283
/// <exception cref="OpusException" />
8384
/// <exception cref="ObjectDisposedException" />
84-
public static bool GetOsceBwe(this OpusDecoder decoder)
85+
public static bool GetOsceBwe(this IOpusDecoder decoder)
8586
{
8687
var value = 0;
8788
decoder.Ctl(DecoderCTL.OPUS_GET_OSCE_BWE, ref value);
@@ -95,7 +96,7 @@ public static bool GetOsceBwe(this OpusDecoder decoder)
9596
/// <param name="disabled">Whether to disable all found extensions in the padding area.</param>
9697
/// <exception cref="OpusException" />
9798
/// <exception cref="ObjectDisposedException" />
98-
public static void SetIgnoreExtensions(this OpusDecoder decoder, bool disabled)
99+
public static void SetIgnoreExtensions(this IOpusDecoder decoder, bool disabled)
99100
{
100101
decoder.Ctl(DecoderCTL.OPUS_SET_IGNORE_EXTENSIONS, disabled ? 1 : 0);
101102
}
@@ -107,7 +108,7 @@ public static void SetIgnoreExtensions(this OpusDecoder decoder, bool disabled)
107108
/// <returns>Whether the decoder is ignoring extensions.</returns>
108109
/// <exception cref="OpusException" />
109110
/// <exception cref="ObjectDisposedException" />
110-
public static bool GetIgnoreExtensions(this OpusDecoder decoder)
111+
public static bool GetIgnoreExtensions(this IOpusDecoder decoder)
111112
{
112113
var value = 0;
113114
decoder.Ctl(DecoderCTL.OPUS_GET_IGNORE_EXTENSIONS, ref value);
@@ -120,7 +121,7 @@ public static bool GetIgnoreExtensions(this OpusDecoder decoder)
120121
/// <param name="decoder">The decoder state.</param>
121122
/// <exception cref="OpusException" />
122123
/// <exception cref="ObjectDisposedException" />
123-
public static void Reset(this OpusDecoder decoder)
124+
public static void Reset(this IOpusDecoder decoder)
124125
{
125126
decoder.Ctl(GenericCTL.OPUS_RESET_STATE);
126127
}
@@ -132,7 +133,7 @@ public static void Reset(this OpusDecoder decoder)
132133
/// <returns>The final state of the codec's entropy coder.</returns>
133134
/// <exception cref="OpusException" />
134135
/// <exception cref="ObjectDisposedException" />
135-
public static uint GetFinalRange(this OpusDecoder decoder)
136+
public static uint GetFinalRange(this IOpusDecoder decoder)
136137
{
137138
var finalRange = 0u;
138139
decoder.Ctl(GenericCTL.OPUS_GET_FINAL_RANGE, ref finalRange);
@@ -146,7 +147,7 @@ public static uint GetFinalRange(this OpusDecoder decoder)
146147
/// <returns>The decoder's last bandpass.</returns>
147148
/// <exception cref="OpusException" />
148149
/// <exception cref="ObjectDisposedException" />
149-
public static OpusPredefinedValues GetBandwidth(this OpusDecoder decoder)
150+
public static OpusPredefinedValues GetBandwidth(this IOpusDecoder decoder)
150151
{
151152
var bandPass = 0;
152153
decoder.Ctl(GenericCTL.OPUS_GET_BANDWIDTH, ref bandPass);
@@ -160,7 +161,7 @@ public static OpusPredefinedValues GetBandwidth(this OpusDecoder decoder)
160161
/// <returns>The decoder's configured sample rate.</returns>
161162
/// <exception cref="OpusException" />
162163
/// <exception cref="ObjectDisposedException" />
163-
public static int GetSampleRate(this OpusDecoder decoder)
164+
public static int GetSampleRate(this IOpusDecoder decoder)
164165
{
165166
var sampleRate = 0;
166167
decoder.Ctl(GenericCTL.OPUS_GET_SAMPLE_RATE, ref sampleRate);
@@ -174,7 +175,7 @@ public static int GetSampleRate(this OpusDecoder decoder)
174175
/// <param name="disabled">Whether to disable or not.</param>
175176
/// <exception cref="OpusException" />
176177
/// <exception cref="ObjectDisposedException" />
177-
public static void SetPhaseInversionDisabled(this OpusDecoder decoder, bool disabled)
178+
public static void SetPhaseInversionDisabled(this IOpusDecoder decoder, bool disabled)
178179
{
179180
decoder.Ctl(GenericCTL.OPUS_SET_PHASE_INVERSION_DISABLED, disabled ? 1 : 0);
180181
}
@@ -186,7 +187,7 @@ public static void SetPhaseInversionDisabled(this OpusDecoder decoder, bool disa
186187
/// <returns>Whether the phase inversion is disabled or not.</returns>
187188
/// <exception cref="OpusException" />
188189
/// <exception cref="ObjectDisposedException" />
189-
public static bool GetPhaseInversionDisabled(this OpusDecoder decoder)
190+
public static bool GetPhaseInversionDisabled(this IOpusDecoder decoder)
190191
{
191192
var disabled = 0;
192193
decoder.Ctl(GenericCTL.OPUS_GET_PHASE_INVERSION_DISABLED, ref disabled);

0 commit comments

Comments
 (0)