Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<OpusSharpVersion>1.6.3</OpusSharpVersion>
<OpusSharpCoreVersion>1.6.0.3</OpusSharpCoreVersion>
<OpusSharpNativesVersion>1.6.0.2</OpusSharpNativesVersion>
<OpusSharpVersion>1.6.4</OpusSharpVersion>
<OpusSharpCoreVersion>1.6.1.0</OpusSharpCoreVersion>
<OpusSharpNativesVersion>1.6.1.0</OpusSharpNativesVersion>
<PackageProjectUrl>https://avionblock.github.io/OpusSharp/index.html</PackageProjectUrl>
<RepositoryUrl>https://github.com/AvionBlock/OpusSharp</RepositoryUrl>
</PropertyGroup>
Expand Down
29 changes: 15 additions & 14 deletions OpusSharp.Core/Extensions/OpusDecoderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using OpusSharp.Core.Interfaces;

namespace OpusSharp.Core.Extensions
{
Expand All @@ -15,7 +16,7 @@ public static class OpusDecoderExtensions
/// <param name="gain">The gain to set.</param>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static void SetGain(this OpusDecoder decoder, short gain)
public static void SetGain(this IOpusDecoder decoder, short gain)
{
decoder.Ctl(DecoderCTL.OPUS_SET_GAIN, gain);
}
Expand All @@ -27,7 +28,7 @@ public static void SetGain(this OpusDecoder decoder, short gain)
/// <returns>The gain for the opus decoder.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static int GetGain(this OpusDecoder decoder)
public static int GetGain(this IOpusDecoder decoder)
{
var gain = 0;
decoder.Ctl(DecoderCTL.OPUS_GET_GAIN, ref gain);
Expand All @@ -41,7 +42,7 @@ public static int GetGain(this OpusDecoder decoder)
/// <returns>The last packet duration (in samples).</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static int GetLastPacketDuration(this OpusDecoder decoder)
public static int GetLastPacketDuration(this IOpusDecoder decoder)
{
var lastPacketDuration = 0;
decoder.Ctl(DecoderCTL.OPUS_GET_LAST_PACKET_DURATION, ref lastPacketDuration);
Expand All @@ -55,7 +56,7 @@ public static int GetLastPacketDuration(this OpusDecoder decoder)
/// <returns>The pitch of the last decoded frame if available.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static int GetPitch(this OpusDecoder decoder)
public static int GetPitch(this IOpusDecoder decoder)
{
var pitch = 0;
decoder.Ctl(DecoderCTL.OPUS_GET_PITCH, ref pitch);
Expand All @@ -69,7 +70,7 @@ public static int GetPitch(this OpusDecoder decoder)
/// <param name="enabled">Whether to enable or disable the OSCE BWE module.</param>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static void SetOsceBwe(this OpusDecoder decoder, bool enabled)
public static void SetOsceBwe(this IOpusDecoder decoder, bool enabled)
{
decoder.Ctl(DecoderCTL.OPUS_SET_OSCE_BWE, enabled ? 1 : 0);
}
Expand All @@ -81,7 +82,7 @@ public static void SetOsceBwe(this OpusDecoder decoder, bool enabled)
/// <returns>Whether the OSCE BWE module is enabled or not.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static bool GetOsceBwe(this OpusDecoder decoder)
public static bool GetOsceBwe(this IOpusDecoder decoder)
{
var value = 0;
decoder.Ctl(DecoderCTL.OPUS_GET_OSCE_BWE, ref value);
Expand All @@ -95,7 +96,7 @@ public static bool GetOsceBwe(this OpusDecoder decoder)
/// <param name="disabled">Whether to disable all found extensions in the padding area.</param>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static void SetIgnoreExtensions(this OpusDecoder decoder, bool disabled)
public static void SetIgnoreExtensions(this IOpusDecoder decoder, bool disabled)
{
decoder.Ctl(DecoderCTL.OPUS_SET_IGNORE_EXTENSIONS, disabled ? 1 : 0);
}
Expand All @@ -107,7 +108,7 @@ public static void SetIgnoreExtensions(this OpusDecoder decoder, bool disabled)
/// <returns>Whether the decoder is ignoring extensions.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static bool GetIgnoreExtensions(this OpusDecoder decoder)
public static bool GetIgnoreExtensions(this IOpusDecoder decoder)
{
var value = 0;
decoder.Ctl(DecoderCTL.OPUS_GET_IGNORE_EXTENSIONS, ref value);
Expand All @@ -120,7 +121,7 @@ public static bool GetIgnoreExtensions(this OpusDecoder decoder)
/// <param name="decoder">The decoder state.</param>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static void Reset(this OpusDecoder decoder)
public static void Reset(this IOpusDecoder decoder)
{
decoder.Ctl(GenericCTL.OPUS_RESET_STATE);
}
Expand All @@ -132,7 +133,7 @@ public static void Reset(this OpusDecoder decoder)
/// <returns>The final state of the codec's entropy coder.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static uint GetFinalRange(this OpusDecoder decoder)
public static uint GetFinalRange(this IOpusDecoder decoder)
{
var finalRange = 0u;
decoder.Ctl(GenericCTL.OPUS_GET_FINAL_RANGE, ref finalRange);
Expand All @@ -146,7 +147,7 @@ public static uint GetFinalRange(this OpusDecoder decoder)
/// <returns>The decoder's last bandpass.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static OpusPredefinedValues GetBandwidth(this OpusDecoder decoder)
public static OpusPredefinedValues GetBandwidth(this IOpusDecoder decoder)
{
var bandPass = 0;
decoder.Ctl(GenericCTL.OPUS_GET_BANDWIDTH, ref bandPass);
Expand All @@ -160,7 +161,7 @@ public static OpusPredefinedValues GetBandwidth(this OpusDecoder decoder)
/// <returns>The decoder's configured sample rate.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static int GetSampleRate(this OpusDecoder decoder)
public static int GetSampleRate(this IOpusDecoder decoder)
{
var sampleRate = 0;
decoder.Ctl(GenericCTL.OPUS_GET_SAMPLE_RATE, ref sampleRate);
Expand All @@ -174,7 +175,7 @@ public static int GetSampleRate(this OpusDecoder decoder)
/// <param name="disabled">Whether to disable or not.</param>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static void SetPhaseInversionDisabled(this OpusDecoder decoder, bool disabled)
public static void SetPhaseInversionDisabled(this IOpusDecoder decoder, bool disabled)
{
decoder.Ctl(GenericCTL.OPUS_SET_PHASE_INVERSION_DISABLED, disabled ? 1 : 0);
}
Expand All @@ -186,7 +187,7 @@ public static void SetPhaseInversionDisabled(this OpusDecoder decoder, bool disa
/// <returns>Whether the phase inversion is disabled or not.</returns>
/// <exception cref="OpusException" />
/// <exception cref="ObjectDisposedException" />
public static bool GetPhaseInversionDisabled(this OpusDecoder decoder)
public static bool GetPhaseInversionDisabled(this IOpusDecoder decoder)
{
var disabled = 0;
decoder.Ctl(GenericCTL.OPUS_GET_PHASE_INVERSION_DISABLED, ref disabled);
Expand Down
Loading
Loading