Skip to content

Commit d1a5764

Browse files
committed
Upgrade OpusEncoder and Decoder.
1 parent d2f216c commit d1a5764

4 files changed

Lines changed: 32 additions & 32 deletions

File tree

OpusSharp.Core/Dynamic/OpusDecoder.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public unsafe int Decode(byte[]? input, int length, float[] output, int frame_si
174174
public int Ctl(DecoderCTL request)
175175
{
176176
ThrowIfDisposed();
177-
var result = NativeOpus.opussharp_decoder_ctl(_handler, (int)request);
177+
var result = NativeOpus.opus_decoder_ctl(_handler, (int)request);
178178
CheckError(result);
179179
return result;
180180
}
@@ -183,7 +183,7 @@ public int Ctl(DecoderCTL request)
183183
public int Ctl(DecoderCTL request, int value)
184184
{
185185
ThrowIfDisposed();
186-
var result = NativeOpus.opussharp_decoder_ctl_i(_handler, (int)request, value);
186+
var result = NativeOpus.opus_decoder_ctl(_handler, (int)request, value);
187187
CheckError(result);
188188
return result;
189189
}
@@ -194,7 +194,7 @@ public unsafe int Ctl<T>(DecoderCTL request, ref T value) where T : unmanaged
194194
ThrowIfDisposed();
195195
fixed (void* valuePtr = &value)
196196
{
197-
var result = NativeOpus.opussharp_decoder_ctl_p(_handler, (int)request, valuePtr);
197+
var result = NativeOpus.opus_decoder_ctl(_handler, (int)request, valuePtr);
198198
CheckError(result);
199199
return result;
200200
}
@@ -204,7 +204,7 @@ public unsafe int Ctl<T>(DecoderCTL request, ref T value) where T : unmanaged
204204
public int Ctl(GenericCTL request)
205205
{
206206
ThrowIfDisposed();
207-
var result = NativeOpus.opussharp_decoder_ctl(_handler, (int)request);
207+
var result = NativeOpus.opus_decoder_ctl(_handler, (int)request);
208208
CheckError(result);
209209
return result;
210210
}
@@ -213,7 +213,7 @@ public int Ctl(GenericCTL request)
213213
public int Ctl(GenericCTL request, int value)
214214
{
215215
ThrowIfDisposed();
216-
var result = NativeOpus.opussharp_decoder_ctl_i(_handler, (int)request, value);
216+
var result = NativeOpus.opus_decoder_ctl(_handler, (int)request, value);
217217
CheckError(result);
218218
return result;
219219
}
@@ -224,7 +224,7 @@ public unsafe int Ctl<T>(GenericCTL request, ref T value) where T : unmanaged
224224
ThrowIfDisposed();
225225
fixed (void* valuePtr = &value)
226226
{
227-
var result = NativeOpus.opussharp_decoder_ctl_p(_handler, (int)request, valuePtr);
227+
var result = NativeOpus.opus_decoder_ctl(_handler, (int)request, valuePtr);
228228
CheckError(result);
229229
return result;
230230
}

OpusSharp.Core/Dynamic/OpusEncoder.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using OpusSharp.Core.SafeHandlers;
1+
using OpusSharp.Core.SafeHandlers;
22
using System;
33
using OpusSharp.Core.Interfaces;
44

@@ -164,7 +164,7 @@ public unsafe int Encode(float[] input, int frame_size, byte[] output, int max_d
164164
public int Ctl(EncoderCTL request)
165165
{
166166
ThrowIfDisposed();
167-
var result = NativeOpus.opussharp_encoder_ctl(_handler, (int)request);
167+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request);
168168
CheckError(result);
169169
return result;
170170
}
@@ -173,7 +173,7 @@ public int Ctl(EncoderCTL request)
173173
public int Ctl(EncoderCTL request, int value)
174174
{
175175
ThrowIfDisposed();
176-
var result = NativeOpus.opussharp_encoder_ctl_i(_handler, (int)request, value);
176+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request, value);
177177
CheckError(result);
178178
return result;
179179
}
@@ -184,7 +184,7 @@ public unsafe int Ctl<T>(EncoderCTL request, ref T value) where T : unmanaged
184184
ThrowIfDisposed();
185185
fixed (void* valuePtr = &value)
186186
{
187-
var result = NativeOpus.opussharp_encoder_ctl_p(_handler, (int)request, valuePtr);
187+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr);
188188
CheckError(result);
189189
return result;
190190
}
@@ -196,7 +196,7 @@ public unsafe int Ctl<T>(EncoderCTL request, ref T value, int value2) where T :
196196
ThrowIfDisposed();
197197
fixed (void* valuePtr = &value)
198198
{
199-
var result = NativeOpus.opussharp_encoder_ctl_pi(_handler, (int)request, valuePtr, value2);
199+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr, value2);
200200
CheckError(result);
201201
return result;
202202
}
@@ -208,7 +208,7 @@ public unsafe int Ctl<T>(EncoderCTL request, int value, ref T value2) where T :
208208
ThrowIfDisposed();
209209
fixed (void* value2Ptr = &value2)
210210
{
211-
var result = NativeOpus.opussharp_encoder_ctl_ip(_handler, (int)request, value, value2Ptr);
211+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request, value, value2Ptr);
212212
CheckError(result);
213213
return result;
214214
}
@@ -222,7 +222,7 @@ public unsafe int Ctl<T, T2>(EncoderCTL request, ref T value, ref T2 value2)
222222
fixed (void* valuePtr = &value)
223223
fixed (void* value2Ptr = &value2)
224224
{
225-
var result = NativeOpus.opussharp_encoder_ctl_pp(_handler, (int)request, valuePtr, value2Ptr);
225+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr, value2Ptr);
226226
CheckError(result);
227227
return result;
228228
}
@@ -232,7 +232,7 @@ public unsafe int Ctl<T, T2>(EncoderCTL request, ref T value, ref T2 value2)
232232
public int Ctl(GenericCTL request)
233233
{
234234
ThrowIfDisposed();
235-
var result = NativeOpus.opussharp_encoder_ctl(_handler, (int)request);
235+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request);
236236
CheckError(result);
237237
return result;
238238
}
@@ -241,7 +241,7 @@ public int Ctl(GenericCTL request)
241241
public int Ctl(GenericCTL request, int value)
242242
{
243243
ThrowIfDisposed();
244-
var result = NativeOpus.opussharp_encoder_ctl_i(_handler, (int)request, value);
244+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request, value);
245245
CheckError(result);
246246
return result;
247247
}
@@ -252,7 +252,7 @@ public unsafe int Ctl<T>(GenericCTL request, ref T value) where T : unmanaged
252252
ThrowIfDisposed();
253253
fixed (void* valuePtr = &value)
254254
{
255-
var result = NativeOpus.opussharp_encoder_ctl_p(_handler, (int)request, valuePtr);
255+
var result = NativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr);
256256
CheckError(result);
257257
return result;
258258
}

OpusSharp.Core/Static/OpusDecoder.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public unsafe int Decode(byte[]? input, int length, float[] output, int frame_si
174174
public int Ctl(DecoderCTL request)
175175
{
176176
ThrowIfDisposed();
177-
var result = StaticNativeOpus.opussharp_decoder_ctl(_handler, (int)request);
177+
var result = StaticNativeOpus.opus_decoder_ctl(_handler, (int)request);
178178
CheckError(result);
179179
return result;
180180
}
@@ -183,7 +183,7 @@ public int Ctl(DecoderCTL request)
183183
public int Ctl(DecoderCTL request, int value)
184184
{
185185
ThrowIfDisposed();
186-
var result = StaticNativeOpus.opussharp_decoder_ctl_i(_handler, (int)request, value);
186+
var result = StaticNativeOpus.opus_decoder_ctl(_handler, (int)request, value);
187187
CheckError(result);
188188
return result;
189189
}
@@ -194,7 +194,7 @@ public unsafe int Ctl<T>(DecoderCTL request, ref T value) where T : unmanaged
194194
ThrowIfDisposed();
195195
fixed (void* valuePtr = &value)
196196
{
197-
var result = StaticNativeOpus.opussharp_decoder_ctl_p(_handler, (int)request, valuePtr);
197+
var result = StaticNativeOpus.opus_decoder_ctl(_handler, (int)request, valuePtr);
198198
CheckError(result);
199199
return result;
200200
}
@@ -204,7 +204,7 @@ public unsafe int Ctl<T>(DecoderCTL request, ref T value) where T : unmanaged
204204
public int Ctl(GenericCTL request)
205205
{
206206
ThrowIfDisposed();
207-
var result = StaticNativeOpus.opussharp_decoder_ctl(_handler, (int)request);
207+
var result = StaticNativeOpus.opus_decoder_ctl(_handler, (int)request);
208208
CheckError(result);
209209
return result;
210210
}
@@ -213,7 +213,7 @@ public int Ctl(GenericCTL request)
213213
public int Ctl(GenericCTL request, int value)
214214
{
215215
ThrowIfDisposed();
216-
var result = StaticNativeOpus.opussharp_decoder_ctl_i(_handler, (int)request, value);
216+
var result = StaticNativeOpus.opus_decoder_ctl(_handler, (int)request, value);
217217
CheckError(result);
218218
return result;
219219
}
@@ -224,7 +224,7 @@ public unsafe int Ctl<T>(GenericCTL request, ref T value) where T : unmanaged
224224
ThrowIfDisposed();
225225
fixed (void* valuePtr = &value)
226226
{
227-
var result = StaticNativeOpus.opussharp_decoder_ctl_p(_handler, (int)request, valuePtr);
227+
var result = StaticNativeOpus.opus_decoder_ctl(_handler, (int)request, valuePtr);
228228
CheckError(result);
229229
return result;
230230
}

OpusSharp.Core/Static/OpusEncoder.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using OpusSharp.Core.SafeHandlers;
1+
using OpusSharp.Core.SafeHandlers;
22
using System;
33
using OpusSharp.Core.Interfaces;
44

@@ -164,7 +164,7 @@ public unsafe int Encode(float[] input, int frame_size, byte[] output, int max_d
164164
public int Ctl(EncoderCTL request)
165165
{
166166
ThrowIfDisposed();
167-
var result = StaticNativeOpus.opussharp_encoder_ctl(_handler, (int)request);
167+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request);
168168
CheckError(result);
169169
return result;
170170
}
@@ -173,7 +173,7 @@ public int Ctl(EncoderCTL request)
173173
public int Ctl(EncoderCTL request, int value)
174174
{
175175
ThrowIfDisposed();
176-
var result = StaticNativeOpus.opussharp_encoder_ctl_i(_handler, (int)request, value);
176+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request, value);
177177
CheckError(result);
178178
return result;
179179
}
@@ -184,7 +184,7 @@ public unsafe int Ctl<T>(EncoderCTL request, ref T value) where T : unmanaged
184184
ThrowIfDisposed();
185185
fixed (void* valuePtr = &value)
186186
{
187-
var result = StaticNativeOpus.opussharp_encoder_ctl_p(_handler, (int)request, valuePtr);
187+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr);
188188
CheckError(result);
189189
return result;
190190
}
@@ -196,7 +196,7 @@ public unsafe int Ctl<T>(EncoderCTL request, ref T value, int value2) where T :
196196
ThrowIfDisposed();
197197
fixed (void* valuePtr = &value)
198198
{
199-
var result = StaticNativeOpus.opussharp_encoder_ctl_pi(_handler, (int)request, valuePtr, value2);
199+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr, value2);
200200
CheckError(result);
201201
return result;
202202
}
@@ -208,7 +208,7 @@ public unsafe int Ctl<T>(EncoderCTL request, int value, ref T value2) where T :
208208
ThrowIfDisposed();
209209
fixed (void* value2Ptr = &value2)
210210
{
211-
var result = StaticNativeOpus.opussharp_encoder_ctl_ip(_handler, (int)request, value, value2Ptr);
211+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request, value, value2Ptr);
212212
CheckError(result);
213213
return result;
214214
}
@@ -222,7 +222,7 @@ public unsafe int Ctl<T, T2>(EncoderCTL request, ref T value, ref T2 value2)
222222
fixed (void* valuePtr = &value)
223223
fixed (void* value2Ptr = &value2)
224224
{
225-
var result = StaticNativeOpus.opussharp_encoder_ctl_pp(_handler, (int)request, valuePtr, value2Ptr);
225+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr, value2Ptr);
226226
CheckError(result);
227227
return result;
228228
}
@@ -232,7 +232,7 @@ public unsafe int Ctl<T, T2>(EncoderCTL request, ref T value, ref T2 value2)
232232
public int Ctl(GenericCTL request)
233233
{
234234
ThrowIfDisposed();
235-
var result = StaticNativeOpus.opussharp_encoder_ctl(_handler, (int)request);
235+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request);
236236
CheckError(result);
237237
return result;
238238
}
@@ -241,7 +241,7 @@ public int Ctl(GenericCTL request)
241241
public int Ctl(GenericCTL request, int value)
242242
{
243243
ThrowIfDisposed();
244-
var result = StaticNativeOpus.opussharp_encoder_ctl_i(_handler, (int)request, value);
244+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request, value);
245245
CheckError(result);
246246
return result;
247247
}
@@ -252,7 +252,7 @@ public unsafe int Ctl<T>(GenericCTL request, ref T value) where T : unmanaged
252252
ThrowIfDisposed();
253253
fixed (void* valuePtr = &value)
254254
{
255-
var result = StaticNativeOpus.opussharp_encoder_ctl_p(_handler, (int)request, valuePtr);
255+
var result = StaticNativeOpus.opus_encoder_ctl(_handler, (int)request, valuePtr);
256256
CheckError(result);
257257
return result;
258258
}

0 commit comments

Comments
 (0)