com.shinolab.autd3-sdk.modulation 0.9.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Modulation.cs CHANGED
@@ -6,33 +6,48 @@ using System.Runtime.InteropServices;
6
6
 
7
7
  namespace AUTD3
8
8
  {
9
+ [StructLayout(LayoutKind.Sequential)]
10
+ internal struct SineOptionNative
11
+ {
12
+ public byte Amplitude;
13
+ public byte Offset;
14
+ public float PhaseRad;
15
+ public byte Clamp;
16
+ }
17
+
18
+ [StructLayout(LayoutKind.Sequential)]
19
+ internal struct SquareOptionNative
20
+ {
21
+ public byte Low;
22
+ public byte High;
23
+ public float Duty;
24
+ }
25
+
26
+ [StructLayout(LayoutKind.Sequential)]
27
+ internal struct FourierOptionNative
28
+ {
29
+ public byte HasScaleFactor;
30
+ public float ScaleFactor;
31
+ public byte Clamp;
32
+ public byte Offset;
33
+ }
34
+
9
35
  [StructLayout(LayoutKind.Sequential)]
10
36
  internal struct SineComponentNative
11
37
  {
12
- public byte Mode;
13
38
  public float Freq;
14
- public uint FreqInt;
15
- public IntPtr Option;
39
+ public SineOptionNative Option;
16
40
  }
17
41
 
18
42
  internal static class NativeModulation
19
43
  {
20
44
  private const string Lib = "autd3_modulation";
21
45
 
22
- private const string ClientLib = "autd3capi";
23
-
24
- static NativeModulation()
25
- {
26
- NativeAbi.Verify(Lib, autd3_abi_version());
27
- NativeAbi.Verify(ClientLib, autd3capi_abi_version());
28
- }
46
+ static NativeModulation() => NativeAbi.Verify(Lib, autd3_abi_version());
29
47
 
30
48
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
31
49
  private static extern uint autd3_abi_version();
32
50
 
33
- [DllImport(ClientLib, EntryPoint = "autd3_abi_version", CallingConvention = CallingConvention.Cdecl)]
34
- private static extern uint autd3capi_abi_version();
35
-
36
51
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
37
52
  internal static extern IntPtr autd3_modulation_buffer_new();
38
53
 
@@ -53,46 +68,59 @@ namespace AUTD3
53
68
 
54
69
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
55
70
  [return: MarshalAs(UnmanagedType.I1)]
56
- internal static extern bool autd3_modulation_samples_per_period(ushort divider, uint freqHz, out uint outValue);
71
+ internal static extern bool autd3_modulation_samples_per_period(ushort divider, float freqHz, out uint outValue);
57
72
 
58
73
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
59
- internal static extern IntPtr autd3_modulation_sine_option_new(byte amplitude, byte offset, float phase, [MarshalAs(UnmanagedType.I1)] bool clamp, IntPtr samplingConfig);
74
+ internal static extern int autd3_modulation_sine_option_default(out byte amplitude, out byte offset, out float phaseRad, [MarshalAs(UnmanagedType.I1)] out bool clamp);
60
75
 
61
76
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
62
- internal static extern void autd3_modulation_sine_option_free(IntPtr option);
77
+ internal static extern int autd3_modulation_square_option_default(out byte low, out byte high, out float duty);
63
78
 
64
79
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
65
- internal static extern int autd3_modulation_sine(byte mode, float freq, uint freqInt, IntPtr option, ModulationBufferHandle buffer, byte[] outErr, UIntPtr outErrLen);
80
+ internal static extern int autd3_modulation_fourier_option_default([MarshalAs(UnmanagedType.I1)] out bool hasScaleFactor, out float scaleFactor, [MarshalAs(UnmanagedType.I1)] out bool clamp, out byte offset);
66
81
 
67
82
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
68
- internal static extern IntPtr autd3_modulation_square_option_new(byte low, byte high, float duty, IntPtr samplingConfig);
83
+ internal static extern int autd3_modulation_sine(float freq, SineOptionNative option, ushort samplingDivide, ModulationBufferHandle buffer, byte[] outErr, UIntPtr outErrLen);
69
84
 
70
85
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
71
- internal static extern void autd3_modulation_square_option_free(IntPtr option);
86
+ internal static extern int autd3_modulation_square(float freq, SquareOptionNative option, ushort samplingDivide, ModulationBufferHandle buffer, byte[] outErr, UIntPtr outErrLen);
72
87
 
73
88
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
74
- internal static extern int autd3_modulation_square(byte mode, float freq, uint freqInt, IntPtr option, ModulationBufferHandle buffer, byte[] outErr, UIntPtr outErrLen);
89
+ internal static extern int autd3_modulation_fourier(SineComponentNative[] components, UIntPtr numComponents, FourierOptionNative option, ushort samplingDivide, ModulationBufferHandle buffer, byte[] outErr, UIntPtr outErrLen);
75
90
 
76
91
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
77
- internal static extern IntPtr autd3_modulation_fourier_option_new([MarshalAs(UnmanagedType.I1)] bool hasScaleFactor, float scaleFactor, [MarshalAs(UnmanagedType.I1)] bool clamp, byte offset);
92
+ internal static extern int autd3_modulation_buffer_copy_to(ModulationBufferHandle buffer, [Out] byte[] dst, UIntPtr len);
78
93
 
79
94
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
80
- internal static extern void autd3_modulation_fourier_option_free(IntPtr option);
95
+ internal static extern int autd3_modulation_constant(byte amplitude, ModulationBufferHandle buffer);
81
96
 
82
97
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
83
- internal static extern int autd3_modulation_fourier(SineComponentNative[] components, UIntPtr numComponents, IntPtr option, ModulationBufferHandle buffer, byte[] outErr, UIntPtr outErrLen);
98
+ internal static extern int autd3_modulation_radiation_pressure_inplace(ModulationBufferHandle buffer);
99
+ }
100
+
101
+ internal static class NativeModulationOp
102
+ {
103
+ private const string Lib = "autd3capi";
104
+
105
+ static NativeModulationOp() => NativeAbi.Verify(Lib, autd3_abi_version());
84
106
 
85
107
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
86
- internal static extern int autd3_modulation_constant(byte intensity, ModulationBufferHandle buffer);
108
+ private static extern uint autd3_abi_version();
87
109
 
88
110
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
89
- internal static extern int autd3_modulation_radiation_pressure(ModulationBufferHandle src, ModulationBufferHandle dst);
111
+ internal static extern IntPtr autd3_op_modulation(byte bank, ushort samplingDivide, ModulationBufferHandle modulationBuffer, ushort loopRep, byte transitionMode, ulong transitionValue);
90
112
 
91
113
  [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
92
- internal static extern int autd3_modulation_radiation_pressure_inplace(ModulationBufferHandle buffer);
114
+ internal static extern IntPtr autd3_op_write_modulation_buffer(byte bank, uint offset, ModulationBufferHandle modulationBuffer);
115
+
116
+ [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
117
+ internal static extern UIntPtr autd3_op_write_modulation_buffer_max_len();
93
118
 
94
- [DllImport(ClientLib, CallingConvention = CallingConvention.Cdecl)]
95
- internal static extern IntPtr autd3_op_modulation(byte bank, IntPtr samplingConfig, ModulationBufferHandle modulationBuffer, ushort loopRep, byte transitionMode, ulong transitionValue, uint transitionMarginNs);
119
+ [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
120
+ internal static extern IntPtr autd3_op_config_modulation(byte bank, ushort samplingDivide, uint size, ushort rep);
121
+
122
+ [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
123
+ internal static extern IntPtr autd3_op_activate_modulation_bank(byte bank, byte transitionMode, ulong transitionValue);
96
124
  }
97
125
 
98
126
  internal sealed class ModulationBufferHandle : Autd3SafeHandle
@@ -138,6 +166,16 @@ namespace AUTD3
138
166
 
139
167
  public int Length => (int)NativeModulation.autd3_modulation_buffer_len(Handle);
140
168
 
169
+ public byte[] ToArray()
170
+ {
171
+ var data = new byte[Length];
172
+ if (NativeModulation.autd3_modulation_buffer_copy_to(Handle, data, (UIntPtr)data.Length) != 0)
173
+ {
174
+ throw new Autd3Exception("failed to copy the modulation buffer");
175
+ }
176
+ return data;
177
+ }
178
+
141
179
  public byte this[int index]
142
180
  {
143
181
  get
@@ -167,83 +205,105 @@ namespace AUTD3
167
205
  public void Dispose() => _handle.Dispose();
168
206
  }
169
207
 
170
- public readonly struct SineOption
208
+ internal static class ModulationOptionDefaults
171
209
  {
172
- public byte Amplitude { get; }
173
- public byte Offset { get; }
174
- public Angle Phase { get; }
175
- public bool Clamp { get; }
176
- public SamplingConfig SamplingConfig { get; }
177
-
178
- public SineOption() : this(amplitude: 0xFF)
210
+ internal static readonly byte SineAmplitude;
211
+ internal static readonly byte SineOffset;
212
+ internal static readonly Angle SinePhase;
213
+ internal static readonly bool SineClamp;
214
+ internal static readonly byte SquareLow;
215
+ internal static readonly byte SquareHigh;
216
+ internal static readonly float SquareDuty;
217
+ internal static readonly float? FourierScaleFactor;
218
+ internal static readonly bool FourierClamp;
219
+ internal static readonly byte FourierOffset;
220
+
221
+ static ModulationOptionDefaults()
179
222
  {
223
+ OptionNative.Apply("preset", NativeModulation.autd3_modulation_sine_option_default(out SineAmplitude, out SineOffset, out var phase, out SineClamp));
224
+ SinePhase = Angle.FromRad(phase);
225
+ OptionNative.Apply("preset", NativeModulation.autd3_modulation_square_option_default(out SquareLow, out SquareHigh, out SquareDuty));
226
+ OptionNative.Apply("preset", NativeModulation.autd3_modulation_fourier_option_default(out var hasScaleFactor, out var scaleFactor, out FourierClamp, out FourierOffset));
227
+ FourierScaleFactor = hasScaleFactor ? scaleFactor : (float?)null;
180
228
  }
229
+ }
181
230
 
182
- public SineOption(byte amplitude = 0xFF, byte offset = 0x80, Angle phase = default, bool clamp = false, SamplingConfig? samplingConfig = null)
231
+ public readonly struct SineOption
232
+ {
233
+ private readonly byte? _amplitude;
234
+ public byte Amplitude { get => _amplitude ?? ModulationOptionDefaults.SineAmplitude; init => _amplitude = value; }
235
+ private readonly byte? _offset;
236
+ public byte Offset { get => _offset ?? ModulationOptionDefaults.SineOffset; init => _offset = value; }
237
+ private readonly Angle? _phase;
238
+ public Angle Phase { get => _phase ?? ModulationOptionDefaults.SinePhase; init => _phase = value; }
239
+ private readonly bool? _clamp;
240
+ public bool Clamp { get => _clamp ?? ModulationOptionDefaults.SineClamp; init => _clamp = value; }
241
+
242
+ internal SineOptionNative ToNative() => new SineOptionNative
183
243
  {
184
- Amplitude = amplitude;
185
- Offset = offset;
186
- Phase = phase;
187
- Clamp = clamp;
188
- SamplingConfig = samplingConfig ?? SamplingConfig.Freq4k;
189
- }
244
+ Amplitude = Amplitude,
245
+ Offset = Offset,
246
+ PhaseRad = Phase.Rad,
247
+ Clamp = OptionNative.Flag(Clamp),
248
+ };
190
249
  }
191
250
 
192
251
  public readonly struct SquareOption
193
252
  {
194
- public byte Low { get; }
195
- public byte High { get; }
196
- public float Duty { get; }
197
- public SamplingConfig SamplingConfig { get; }
198
-
199
- public SquareOption() : this(low: 0x00)
200
- {
201
- }
202
-
203
- public SquareOption(byte low = 0x00, byte high = 0xFF, float duty = 0.5f, SamplingConfig? samplingConfig = null)
253
+ private readonly byte? _low;
254
+ public byte Low { get => _low ?? ModulationOptionDefaults.SquareLow; init => _low = value; }
255
+ private readonly byte? _high;
256
+ public byte High { get => _high ?? ModulationOptionDefaults.SquareHigh; init => _high = value; }
257
+ private readonly float? _duty;
258
+ public float Duty { get => _duty ?? ModulationOptionDefaults.SquareDuty; init => _duty = value; }
259
+
260
+ internal SquareOptionNative ToNative() => new SquareOptionNative
204
261
  {
205
- Low = low;
206
- High = high;
207
- Duty = duty;
208
- SamplingConfig = samplingConfig ?? SamplingConfig.Freq4k;
209
- }
262
+ Low = Low,
263
+ High = High,
264
+ Duty = Duty,
265
+ };
210
266
  }
211
267
 
212
268
  public readonly struct FourierOption
213
269
  {
214
- public float? ScaleFactor { get; }
215
- public bool Clamp { get; }
216
- public byte Offset { get; }
270
+ private readonly bool _scaleFactorSet;
271
+ private readonly float? _scaleFactor;
217
272
 
218
- public FourierOption(float? scaleFactor = null, bool clamp = false, byte offset = 0x00)
273
+ public float? ScaleFactor
219
274
  {
220
- ScaleFactor = scaleFactor;
221
- Clamp = clamp;
222
- Offset = offset;
275
+ get => _scaleFactorSet ? _scaleFactor : ModulationOptionDefaults.FourierScaleFactor;
276
+ init
277
+ {
278
+ _scaleFactor = value;
279
+ _scaleFactorSet = true;
280
+ }
223
281
  }
282
+
283
+ private readonly bool? _clamp;
284
+ public bool Clamp { get => _clamp ?? ModulationOptionDefaults.FourierClamp; init => _clamp = value; }
285
+ private readonly byte? _offset;
286
+ public byte Offset { get => _offset ?? ModulationOptionDefaults.FourierOffset; init => _offset = value; }
287
+
288
+ internal FourierOptionNative ToNative() => new FourierOptionNative
289
+ {
290
+ HasScaleFactor = OptionNative.Flag(ScaleFactor.HasValue),
291
+ ScaleFactor = ScaleFactor ?? 0f,
292
+ Clamp = OptionNative.Flag(Clamp),
293
+ Offset = Offset,
294
+ };
224
295
  }
225
296
 
226
297
  public readonly struct SineComponent
227
298
  {
228
299
  public Freq Freq { get; }
229
300
  public SineOption Option { get; }
230
- private readonly bool _nearest;
231
301
 
232
302
  public SineComponent(Freq freq, SineOption option)
233
303
  {
234
304
  Freq = freq;
235
305
  Option = option;
236
- _nearest = false;
237
306
  }
238
-
239
- public SineComponent(Nearest<Freq> freq, SineOption option)
240
- {
241
- Freq = freq.Value;
242
- Option = option;
243
- _nearest = true;
244
- }
245
-
246
- internal byte ModeCode => _nearest ? (byte)2 : Freq.ModeCode;
247
307
  }
248
308
 
249
309
  public sealed class Modulation : ICommand
@@ -254,174 +314,77 @@ namespace AUTD3
254
314
  private readonly LoopBehavior _loopBehavior;
255
315
  private readonly TransitionMode _transitionMode;
256
316
 
257
- public Modulation(SamplingConfig config, ModulationBuffer data, LoopBehavior? loopBehavior = null, TransitionMode? transitionMode = null)
317
+ public Modulation(SamplingConfig config, ModulationBuffer data, LoopBehavior loopBehavior = default, TransitionMode transitionMode = default)
258
318
  : this(ModulationBank.B0, config, data, loopBehavior, transitionMode)
259
319
  {
260
320
  }
261
321
 
262
- public Modulation(ModulationBank bank, SamplingConfig config, ModulationBuffer data, LoopBehavior? loopBehavior = null, TransitionMode? transitionMode = null)
322
+ public Modulation(ModulationBank bank, SamplingConfig config, ModulationBuffer data, LoopBehavior loopBehavior = default, TransitionMode transitionMode = default)
263
323
  {
264
324
  _bank = bank;
265
325
  _samplingConfig = config;
266
326
  _buffer = data;
267
- _loopBehavior = loopBehavior ?? LoopBehavior.Infinite;
268
- _transitionMode = transitionMode ?? TransitionMode.Immediate;
327
+ _loopBehavior = loopBehavior;
328
+ _transitionMode = transitionMode;
269
329
  }
270
330
 
271
331
  public static ModulationBuffer ModulationBuffer() => new ModulationBuffer();
272
332
 
273
- public static uint SamplesPerPeriod(ushort divider, uint freqHz)
274
- {
275
- if (!NativeModulation.autd3_modulation_samples_per_period(divider, freqHz, out var value))
276
- {
277
- throw new Autd3Exception("samples_per_period is not an integer for the given frequency");
278
- }
279
- return value;
280
- }
281
-
282
- IntPtr ICommand.CreateOp()
283
- {
284
- var sampling = _samplingConfig.CreateHandle();
285
- try
286
- {
287
- return NativeModulation.autd3_op_modulation(
288
- (byte)_bank, sampling, _buffer.Handle, _loopBehavior.Rep, _transitionMode.Mode, _transitionMode.Value, _transitionMode.MarginNs);
289
- }
290
- finally
291
- {
292
- NativeCore.autd3_core_sampling_config_free(sampling);
293
- }
294
- }
333
+ public static uint? SamplesPerPeriod(ushort divider, Freq freq) =>
334
+ NativeModulation.autd3_modulation_samples_per_period(divider, freq.Hz, out var value) ? value : null;
295
335
 
296
- public static void Sine(Nearest<Freq> freq, SineOption option, ModulationBuffer dst) =>
297
- Sine(freq.Value, 2, option, dst);
336
+ IntPtr ICommand.CreateOp(Geometry geometry) =>
337
+ NativeModulationOp.autd3_op_modulation(
338
+ (byte)_bank, _samplingConfig.DivideForNative(), _buffer.Handle, _loopBehavior.Rep, _transitionMode.Mode, _transitionMode.Value);
298
339
 
299
- public static void Sine(Freq freq, SineOption option, ModulationBuffer dst) =>
300
- Sine(freq, freq.ModeCode, option, dst);
301
-
302
- private static void Sine(Freq freq, byte modeCode, SineOption option, ModulationBuffer dst)
340
+ public static void Sine(Freq freq, SineOption option, SamplingConfig config, ModulationBuffer dst)
303
341
  {
304
- var sampling = option.SamplingConfig.CreateHandle();
305
- try
306
- {
307
- var optionHandle = NativeModulation.autd3_modulation_sine_option_new(
308
- option.Amplitude, option.Offset, option.Phase.Rad, option.Clamp, sampling);
309
- try
310
- {
311
- var err = new byte[NativeAbi.ErrorBufferLength];
312
- if (NativeModulation.autd3_modulation_sine(modeCode, freq.HzValue, freq.HzIntValue, optionHandle, dst.Handle, err, (UIntPtr)err.Length) != 0)
313
- {
314
- throw new Autd3Exception(NativeUtil.Utf8(err));
315
- }
316
- }
317
- finally
318
- {
319
- NativeModulation.autd3_modulation_sine_option_free(optionHandle);
320
- }
321
- }
322
- finally
342
+ var sampling = config.DivideForNative();
343
+ var err = new byte[NativeAbi.ErrorBufferLength];
344
+ var code = NativeModulation.autd3_modulation_sine(freq.Hz, option.ToNative(), sampling, dst.Handle, err, (UIntPtr)err.Length);
345
+ if (code != 0)
323
346
  {
324
- NativeCore.autd3_core_sampling_config_free(sampling);
347
+ throw Autd3Exception.FromNative(code, err);
325
348
  }
326
349
  }
327
350
 
328
- public static void Square(Nearest<Freq> freq, SquareOption option, ModulationBuffer dst) =>
329
- Square(freq.Value, 2, option, dst);
330
-
331
- public static void Square(Freq freq, SquareOption option, ModulationBuffer dst) =>
332
- Square(freq, freq.ModeCode, option, dst);
333
-
334
- private static void Square(Freq freq, byte modeCode, SquareOption option, ModulationBuffer dst)
351
+ public static void Square(Freq freq, SquareOption option, SamplingConfig config, ModulationBuffer dst)
335
352
  {
336
- var sampling = option.SamplingConfig.CreateHandle();
337
- try
338
- {
339
- var optionHandle = NativeModulation.autd3_modulation_square_option_new(
340
- option.Low, option.High, option.Duty, sampling);
341
- try
342
- {
343
- var err = new byte[NativeAbi.ErrorBufferLength];
344
- if (NativeModulation.autd3_modulation_square(modeCode, freq.HzValue, freq.HzIntValue, optionHandle, dst.Handle, err, (UIntPtr)err.Length) != 0)
345
- {
346
- throw new Autd3Exception(NativeUtil.Utf8(err));
347
- }
348
- }
349
- finally
350
- {
351
- NativeModulation.autd3_modulation_square_option_free(optionHandle);
352
- }
353
- }
354
- finally
353
+ var sampling = config.DivideForNative();
354
+ var err = new byte[NativeAbi.ErrorBufferLength];
355
+ var code = NativeModulation.autd3_modulation_square(freq.Hz, option.ToNative(), sampling, dst.Handle, err, (UIntPtr)err.Length);
356
+ if (code != 0)
355
357
  {
356
- NativeCore.autd3_core_sampling_config_free(sampling);
358
+ throw Autd3Exception.FromNative(code, err);
357
359
  }
358
360
  }
359
361
 
360
- public static void Constant(byte intensity, ModulationBuffer dst)
362
+ public static void Constant(byte amplitude, ModulationBuffer dst)
361
363
  {
362
- if (NativeModulation.autd3_modulation_constant(intensity, dst.Handle) != 0)
364
+ if (NativeModulation.autd3_modulation_constant(amplitude, dst.Handle) != 0)
363
365
  {
364
366
  throw new Autd3Exception("constant modulation failed");
365
367
  }
366
368
  }
367
369
 
368
- public static void Fourier(SineComponent[] components, FourierOption option, ModulationBuffer dst)
370
+ public static void Fourier(SineComponent[] components, FourierOption option, SamplingConfig config, ModulationBuffer dst)
369
371
  {
370
- var samplingHandles = new List<IntPtr>();
371
- var optionHandles = new List<IntPtr>();
372
+ var sampling = config.DivideForNative();
372
373
  var native = new SineComponentNative[components.Length];
373
- try
374
+ for (var i = 0; i < components.Length; i++)
374
375
  {
375
- for (var i = 0; i < components.Length; i++)
376
+ var c = components[i];
377
+ native[i] = new SineComponentNative
376
378
  {
377
- var c = components[i];
378
- var sampling = c.Option.SamplingConfig.CreateHandle();
379
- samplingHandles.Add(sampling);
380
- var optionHandle = NativeModulation.autd3_modulation_sine_option_new(
381
- c.Option.Amplitude, c.Option.Offset, c.Option.Phase.Rad, c.Option.Clamp, sampling);
382
- optionHandles.Add(optionHandle);
383
- native[i] = new SineComponentNative
384
- {
385
- Mode = c.ModeCode,
386
- Freq = c.Freq.HzValue,
387
- FreqInt = c.Freq.HzIntValue,
388
- Option = optionHandle,
389
- };
390
- }
391
-
392
- var fourierOption = NativeModulation.autd3_modulation_fourier_option_new(
393
- option.ScaleFactor.HasValue, option.ScaleFactor ?? 0f, option.Clamp, option.Offset);
394
- try
395
- {
396
- var err = new byte[NativeAbi.ErrorBufferLength];
397
- if (NativeModulation.autd3_modulation_fourier(native, (UIntPtr)components.Length, fourierOption, dst.Handle, err, (UIntPtr)err.Length) != 0)
398
- {
399
- throw new Autd3Exception(NativeUtil.Utf8(err));
400
- }
401
- }
402
- finally
403
- {
404
- NativeModulation.autd3_modulation_fourier_option_free(fourierOption);
405
- }
406
- }
407
- finally
408
- {
409
- foreach (var optionHandle in optionHandles)
410
- {
411
- NativeModulation.autd3_modulation_sine_option_free(optionHandle);
412
- }
413
- foreach (var sampling in samplingHandles)
414
- {
415
- NativeCore.autd3_core_sampling_config_free(sampling);
416
- }
379
+ Freq = c.Freq.Hz,
380
+ Option = c.Option.ToNative(),
381
+ };
417
382
  }
418
- }
419
-
420
- public static void RadiationPressure(ModulationBuffer src, ModulationBuffer dst)
421
- {
422
- if (NativeModulation.autd3_modulation_radiation_pressure(src.Handle, dst.Handle) != 0)
383
+ var err = new byte[NativeAbi.ErrorBufferLength];
384
+ var code = NativeModulation.autd3_modulation_fourier(native, (UIntPtr)components.Length, option.ToNative(), sampling, dst.Handle, err, (UIntPtr)err.Length);
385
+ if (code != 0)
423
386
  {
424
- throw new Autd3Exception("radiation pressure failed");
387
+ throw Autd3Exception.FromNative(code, err);
425
388
  }
426
389
  }
427
390
 
package/ModulationOps.cs CHANGED
@@ -1,5 +1,4 @@
1
1
  using System;
2
- using System.Runtime.InteropServices;
3
2
 
4
3
  namespace AUTD3
5
4
  {
@@ -9,27 +8,10 @@ namespace AUTD3
9
8
  B1 = 1,
10
9
  }
11
10
 
12
- internal static class NativeModulationOp
13
- {
14
- private const string Lib = "autd3capi";
15
-
16
- static NativeModulationOp() => NativeAbi.Verify(Lib, autd3_abi_version());
17
-
18
- [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
19
- private static extern uint autd3_abi_version();
20
-
21
- [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
22
- internal static extern IntPtr autd3_op_write_modulation_buffer(byte bank, uint offset, ModulationBufferHandle modulationBuffer);
23
-
24
- [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
25
- internal static extern IntPtr autd3_op_config_modulation(byte bank, IntPtr samplingConfig, uint size, ushort rep);
26
-
27
- [DllImport(Lib, CallingConvention = CallingConvention.Cdecl)]
28
- internal static extern IntPtr autd3_op_change_modulation_bank(byte bank, byte transitionMode, ulong transitionValue, uint transitionMarginNs);
29
- }
30
-
31
11
  public sealed class WriteModulationBuffer : ICommand
32
12
  {
13
+ public static readonly int MaxLen = (int)NativeModulationOp.autd3_op_write_modulation_buffer_max_len();
14
+
33
15
  private readonly ModulationBank _bank;
34
16
  private readonly uint _offset;
35
17
  private readonly ModulationBuffer _buffer;
@@ -41,7 +23,7 @@ namespace AUTD3
41
23
  _buffer = data;
42
24
  }
43
25
 
44
- IntPtr ICommand.CreateOp() =>
26
+ IntPtr ICommand.CreateOp(Geometry geometry) =>
45
27
  NativeModulationOp.autd3_op_write_modulation_buffer((byte)_bank, _offset, _buffer.Handle);
46
28
  }
47
29
 
@@ -52,40 +34,30 @@ namespace AUTD3
52
34
  private readonly uint _size;
53
35
  private readonly LoopBehavior _loopBehavior;
54
36
 
55
- public ConfigModulation(ModulationBank bank, SamplingConfig config, uint size, LoopBehavior? loopBehavior = null)
37
+ public ConfigModulation(ModulationBank bank, SamplingConfig config, uint size, LoopBehavior loopBehavior)
56
38
  {
57
39
  _bank = bank;
58
40
  _config = config;
59
41
  _size = size;
60
- _loopBehavior = loopBehavior ?? LoopBehavior.Infinite;
42
+ _loopBehavior = loopBehavior;
61
43
  }
62
44
 
63
- IntPtr ICommand.CreateOp()
64
- {
65
- var sampling = _config.CreateHandle();
66
- try
67
- {
68
- return NativeModulationOp.autd3_op_config_modulation((byte)_bank, sampling, _size, _loopBehavior.Rep);
69
- }
70
- finally
71
- {
72
- NativeCore.autd3_core_sampling_config_free(sampling);
73
- }
74
- }
45
+ IntPtr ICommand.CreateOp(Geometry geometry) =>
46
+ NativeModulationOp.autd3_op_config_modulation((byte)_bank, _config.DivideForNative(), _size, _loopBehavior.Rep);
75
47
  }
76
48
 
77
- public sealed class ChangeModulationBank : ICommand
49
+ public sealed class ActivateModulationBank : ICommand
78
50
  {
79
51
  private readonly ModulationBank _bank;
80
52
  private readonly TransitionMode _transitionMode;
81
53
 
82
- public ChangeModulationBank(ModulationBank bank, TransitionMode? transitionMode = null)
54
+ public ActivateModulationBank(ModulationBank bank, TransitionMode transitionMode)
83
55
  {
84
56
  _bank = bank;
85
- _transitionMode = transitionMode ?? TransitionMode.Immediate;
57
+ _transitionMode = transitionMode;
86
58
  }
87
59
 
88
- IntPtr ICommand.CreateOp() =>
89
- NativeModulationOp.autd3_op_change_modulation_bank((byte)_bank, _transitionMode.Mode, _transitionMode.Value, _transitionMode.MarginNs);
60
+ IntPtr ICommand.CreateOp(Geometry geometry) =>
61
+ NativeModulationOp.autd3_op_activate_modulation_bank((byte)_bank, _transitionMode.Mode, _transitionMode.Value);
90
62
  }
91
63
  }
@@ -5,7 +5,7 @@ The following is a list of those components and the full text of their licenses.
5
5
 
6
6
  ## Overview
7
7
 
8
- - MIT License (51)
8
+ - MIT License (27)
9
9
  - Apache License 2.0 (3)
10
10
  - Unicode License v3 (1)
11
11
 
@@ -226,7 +226,7 @@ Used by:
226
226
  Used by:
227
227
 
228
228
  - nalgebra 0.35.0 — https://github.com/dimforge/nalgebra
229
- - simba 0.10.0 — https://github.com/dimforge/simba
229
+ - simba 0.10.2 — https://github.com/dimforge/simba
230
230
 
231
231
  ```
232
232
  Apache License
@@ -437,10 +437,14 @@ Used by:
437
437
 
438
438
  Used by:
439
439
 
440
- - cfg-if 1.0.4 — https://github.com/rust-lang/cfg-if
440
+ - bitflags 2.13.2 — https://github.com/bitflags/bitflags
441
+ - num-complex 0.4.6 — https://github.com/rust-num/num-complex
442
+ - num-integer 0.1.47 — https://github.com/rust-num/num-integer
443
+ - num-rational 0.4.2 — https://github.com/rust-num/num-rational
444
+ - num-traits 0.2.19 — https://github.com/rust-num/num-traits
441
445
 
442
446
  ```
443
- Copyright (c) 2014 Alex Crichton
447
+ Copyright (c) 2014 The Rust Project Developers
444
448
 
445
449
  Permission is hereby granted, free of charge, to any
446
450
  person obtaining a copy of this software and associated
@@ -472,10 +476,10 @@ DEALINGS IN THE SOFTWARE.
472
476
 
473
477
  Used by:
474
478
 
475
- - core_affinity 0.8.3 — https://github.com/Elzair/core_affinity_rs
479
+ - rawpointer 0.2.1 — https://github.com/bluss/rawpointer/
476
480
 
477
481
  ```
478
- Copyright (c) 2014 The Rust Project Developers
482
+ Copyright (c) 2015
479
483
 
480
484
  Permission is hereby granted, free of charge, to any
481
485
  person obtaining a copy of this software and associated
@@ -500,21 +504,19 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
500
504
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
501
505
  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
502
506
  DEALINGS IN THE SOFTWARE.
507
+
503
508
  ```
504
509
 
505
510
  ## MIT License
506
511
 
507
512
  Used by:
508
513
 
509
- - bitflags 2.13.0 — https://github.com/bitflags/bitflags
510
- - log 0.4.33 — https://github.com/rust-lang/log
511
- - num-complex 0.4.6 — https://github.com/rust-num/num-complex
512
- - num-integer 0.1.46 — https://github.com/rust-num/num-integer
513
- - num-rational 0.4.2 — https://github.com/rust-num/num-rational
514
- - num-traits 0.2.19 — https://github.com/rust-num/num-traits
514
+ - matrixmultiply 0.3.11 — https://github.com/bluss/matrixmultiply/
515
515
 
516
516
  ```
517
- Copyright (c) 2014 The Rust Project Developers
517
+ Copyright (c) 2016 - 2023 Ulrik Sverdrup "bluss"
518
+ Copyirhgt (c) 2018 R. Janis Goldschmidt
519
+ Copyright (c) 2021 DutchGhost [constparse.rs]
518
520
 
519
521
  Permission is hereby granted, free of charge, to any
520
522
  person obtaining a copy of this software and associated
@@ -546,10 +548,11 @@ DEALINGS IN THE SOFTWARE.
546
548
 
547
549
  Used by:
548
550
 
549
- - rawpointer 0.2.1 — https://github.com/bluss/rawpointer/
551
+ - zerocopy-derive 0.8.63 — https://github.com/google/zerocopy
552
+ - zerocopy 0.8.63 — https://github.com/google/zerocopy
550
553
 
551
554
  ```
552
- Copyright (c) 2015
555
+ Copyright 2023 The Fuchsia Authors
553
556
 
554
557
  Permission is hereby granted, free of charge, to any
555
558
  person obtaining a copy of this software and associated
@@ -575,16 +578,19 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
575
578
  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
576
579
  DEALINGS IN THE SOFTWARE.
577
580
 
581
+
578
582
  ```
579
583
 
580
584
  ## MIT License
581
585
 
582
586
  Used by:
583
587
 
584
- - winapi 0.3.9 — https://github.com/retep998/winapi-rs
588
+ - crc 3.4.0 — https://github.com/mrhooray/crc-rs.git
585
589
 
586
590
  ```
587
- Copyright (c) 2015-2018 The winapi-rs Developers
591
+ MIT License
592
+
593
+ Copyright (c) 2017 crc-rs Developers
588
594
 
589
595
  Permission is hereby granted, free of charge, to any person obtaining a copy
590
596
  of this software and associated documentation files (the "Software"), to deal
@@ -610,10 +616,12 @@ SOFTWARE.
610
616
 
611
617
  Used by:
612
618
 
613
- - num_cpus 1.17.0 — https://github.com/seanmonstar/num_cpus
619
+ - crc-catalog 2.5.0 — https://github.com/akhilles/crc-catalog.git
614
620
 
615
621
  ```
616
- Copyright (c) 2015-2025 Sean McArthur
622
+ MIT License
623
+
624
+ Copyright (c) 2019 Akhil Velagapudi
617
625
 
618
626
  Permission is hereby granted, free of charge, to any person obtaining a copy
619
627
  of this software and associated documentation files (the "Software"), to deal
@@ -622,125 +630,16 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
622
630
  copies of the Software, and to permit persons to whom the Software is
623
631
  furnished to do so, subject to the following conditions:
624
632
 
625
- The above copyright notice and this permission notice shall be included in
626
- all copies or substantial portions of the Software.
633
+ The above copyright notice and this permission notice shall be included in all
634
+ copies or substantial portions of the Software.
627
635
 
628
636
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
629
637
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
630
638
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
631
639
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
632
640
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
633
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
634
- THE SOFTWARE.
635
-
636
-
637
- ```
638
-
639
- ## MIT License
640
-
641
- Used by:
642
-
643
- - matrixmultiply 0.3.10 — https://github.com/bluss/matrixmultiply/
644
-
645
- ```
646
- Copyright (c) 2016 - 2023 Ulrik Sverdrup "bluss"
647
- Copyirhgt (c) 2018 R. Janis Goldschmidt
648
- Copyright (c) 2021 DutchGhost [constparse.rs]
649
-
650
- Permission is hereby granted, free of charge, to any
651
- person obtaining a copy of this software and associated
652
- documentation files (the "Software"), to deal in the
653
- Software without restriction, including without
654
- limitation the rights to use, copy, modify, merge,
655
- publish, distribute, sublicense, and/or sell copies of
656
- the Software, and to permit persons to whom the Software
657
- is furnished to do so, subject to the following
658
- conditions:
659
-
660
- The above copyright notice and this permission notice
661
- shall be included in all copies or substantial portions
662
- of the Software.
663
-
664
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
665
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
666
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
667
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
668
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
669
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
670
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
671
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
672
- DEALINGS IN THE SOFTWARE.
673
-
674
- ```
675
-
676
- ## MIT License
677
-
678
- Used by:
679
-
680
- - tracing-core 0.1.36 — https://github.com/tokio-rs/tracing
681
- - tracing 0.1.44 — https://github.com/tokio-rs/tracing
682
-
683
- ```
684
- Copyright (c) 2019 Tokio Contributors
685
-
686
- Permission is hereby granted, free of charge, to any
687
- person obtaining a copy of this software and associated
688
- documentation files (the "Software"), to deal in the
689
- Software without restriction, including without
690
- limitation the rights to use, copy, modify, merge,
691
- publish, distribute, sublicense, and/or sell copies of
692
- the Software, and to permit persons to whom the Software
693
- is furnished to do so, subject to the following
694
- conditions:
695
-
696
- The above copyright notice and this permission notice
697
- shall be included in all copies or substantial portions
698
- of the Software.
699
-
700
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
701
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
702
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
703
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
704
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
705
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
706
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
707
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
708
- DEALINGS IN THE SOFTWARE.
709
-
710
- ```
711
-
712
- ## MIT License
713
-
714
- Used by:
715
-
716
- - libc 0.2.186 — https://github.com/rust-lang/libc
717
-
718
- ```
719
- Copyright (c) The Rust Project Developers
720
-
721
- Permission is hereby granted, free of charge, to any
722
- person obtaining a copy of this software and associated
723
- documentation files (the "Software"), to deal in the
724
- Software without restriction, including without
725
- limitation the rights to use, copy, modify, merge,
726
- publish, distribute, sublicense, and/or sell copies of
727
- the Software, and to permit persons to whom the Software
728
- is furnished to do so, subject to the following
729
- conditions:
730
-
731
- The above copyright notice and this permission notice
732
- shall be included in all copies or substantial portions
733
- of the Software.
734
-
735
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
736
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
737
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
738
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
739
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
740
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
741
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
742
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
743
- DEALINGS IN THE SOFTWARE.
641
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
642
+ SOFTWARE.
744
643
 
745
644
  ```
746
645
 
@@ -748,36 +647,18 @@ DEALINGS IN THE SOFTWARE.
748
647
 
749
648
  Used by:
750
649
 
751
- - zerocopy-derive 0.8.52 — https://github.com/google/zerocopy
752
- - zerocopy 0.8.52 — https://github.com/google/zerocopy
650
+ - bytemuck 1.25.2 — https://github.com/Lokathor/bytemuck
753
651
 
754
652
  ```
755
- Copyright 2023 The Fuchsia Authors
653
+ MIT License
756
654
 
757
- Permission is hereby granted, free of charge, to any
758
- person obtaining a copy of this software and associated
759
- documentation files (the "Software"), to deal in the
760
- Software without restriction, including without
761
- limitation the rights to use, copy, modify, merge,
762
- publish, distribute, sublicense, and/or sell copies of
763
- the Software, and to permit persons to whom the Software
764
- is furnished to do so, subject to the following
765
- conditions:
655
+ Copyright (c) 2019 Daniel "Lokathor" Gee.
766
656
 
767
- The above copyright notice and this permission notice
768
- shall be included in all copies or substantial portions
769
- of the Software.
657
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
770
658
 
771
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
772
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
773
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
774
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
775
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
776
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
777
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
778
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
779
- DEALINGS IN THE SOFTWARE.
659
+ The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
780
660
 
661
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
781
662
 
782
663
  ```
783
664
 
@@ -785,12 +666,12 @@ DEALINGS IN THE SOFTWARE.
785
666
 
786
667
  Used by:
787
668
 
788
- - thread-priority 3.1.1 — https://github.com/iddm/thread-priority
669
+ - wide 1.7.1 — https://github.com/Lokathor/wide
789
670
 
790
671
  ```
791
672
  MIT License
792
673
 
793
- Copyright (c) 2017 Victor Polevoy
674
+ Copyright (c) 2020 Daniel "Lokathor" Gee
794
675
 
795
676
  Permission is hereby granted, free of charge, to any person obtaining a copy
796
677
  of this software and associated documentation files (the "Software"), to deal
@@ -816,26 +697,7 @@ SOFTWARE.
816
697
 
817
698
  Used by:
818
699
 
819
- - bytemuck 1.25.0 — https://github.com/Lokathor/bytemuck
820
-
821
- ```
822
- MIT License
823
-
824
- Copyright (c) 2019 Daniel "Lokathor" Gee.
825
-
826
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
827
-
828
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
829
-
830
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
831
-
832
- ```
833
-
834
- ## MIT License
835
-
836
- Used by:
837
-
838
- - safe_arch 1.0.0 — https://github.com/Lokathor/safe_arch
700
+ - safe_arch 1.2.0 — https://github.com/Lokathor/safe_arch
839
701
 
840
702
  ```
841
703
  MIT License
@@ -854,9 +716,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
854
716
 
855
717
  Used by:
856
718
 
857
- - autd3-rs-core 0.9.0 — https://github.com/shinolab/autd3-sdk
858
- - autd3-rs-modulation 0.9.0 — https://github.com/shinolab/autd3-sdk
859
- - autd3-cpu-wire 0.9.0 — https://github.com/shinolab/autd3-sdk
719
+ - autd3-rs-core 0.13.0 — https://github.com/shinolab/autd3-sdk
720
+ - autd3-rs-modulation 0.13.0 — https://github.com/shinolab/autd3-sdk
721
+ - autd3-cpu-wire 0.13.0 — https://github.com/shinolab/autd3-sdk
860
722
 
861
723
  ```
862
724
  MIT License
@@ -887,23 +749,8 @@ SOFTWARE.
887
749
 
888
750
  Used by:
889
751
 
890
- - autd3-ffi-abi 0.9.0 — https://github.com/shinolab/autd3-sdk
891
- - autd3-ffi-modulation 0.9.0 — https://github.com/shinolab/autd3-sdk
892
- - chrono 0.4.45 — https://github.com/chronotope/chrono
893
- - wide 1.5.0 — https://github.com/Lokathor/wide
894
- - winapi-i686-pc-windows-gnu 0.4.0 — https://github.com/retep998/winapi-rs
895
- - winapi-x86_64-pc-windows-gnu 0.4.0 — https://github.com/retep998/winapi-rs
896
- - windows-collections 0.3.2 — https://github.com/microsoft/windows-rs
897
- - windows-core 0.62.2 — https://github.com/microsoft/windows-rs
898
- - windows-future 0.3.2 — https://github.com/microsoft/windows-rs
899
- - windows-implement 0.60.2 — https://github.com/microsoft/windows-rs
900
- - windows-interface 0.59.3 — https://github.com/microsoft/windows-rs
901
- - windows-link 0.2.1 — https://github.com/microsoft/windows-rs
902
- - windows-numerics 0.3.1 — https://github.com/microsoft/windows-rs
903
- - windows-result 0.4.1 — https://github.com/microsoft/windows-rs
904
- - windows-strings 0.5.1 — https://github.com/microsoft/windows-rs
905
- - windows-threading 0.2.1 — https://github.com/microsoft/windows-rs
906
- - windows 0.62.2 — https://github.com/microsoft/windows-rs
752
+ - autd3-ffi-abi 0.13.0 — https://github.com/shinolab/autd3-sdk
753
+ - autd3-ffi-modulation 0.13.0 — https://github.com/shinolab/autd3-sdk
907
754
 
908
755
  ```
909
756
  MIT License
@@ -931,15 +778,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
931
778
 
932
779
  Used by:
933
780
 
934
- - hermit-abi 0.5.2 — https://github.com/hermit-os/hermit-rs
935
- - pin-project-lite 0.2.17 — https://github.com/taiki-e/pin-project-lite
936
- - proc-macro2 1.0.106 — https://github.com/dtolnay/proc-macro2
937
- - quote 1.0.46 — https://github.com/dtolnay/quote
938
- - rustversion 1.0.22 — https://github.com/dtolnay/rustversion
939
- - syn 2.0.118 — https://github.com/dtolnay/syn
940
- - thiserror-impl 2.0.18 — https://github.com/dtolnay/thiserror
941
- - thiserror 2.0.18 — https://github.com/dtolnay/thiserror
942
- - unicode-ident 1.0.24 — https://github.com/dtolnay/unicode-ident
781
+ - proc-macro2 1.0.107 — https://github.com/dtolnay/proc-macro2
782
+ - quote 1.0.47 — https://github.com/dtolnay/quote
783
+ - syn 2.0.119 — https://github.com/dtolnay/syn
784
+ - syn 3.0.9 — https://github.com/dtolnay/syn
785
+ - thiserror-impl 2.0.21 — https://github.com/dtolnay/thiserror
786
+ - thiserror 2.0.21 — https://github.com/dtolnay/thiserror
787
+ - unicode-ident 1.0.27 — https://github.com/dtolnay/unicode-ident
943
788
 
944
789
  ```
945
790
  Permission is hereby granted, free of charge, to any
@@ -972,37 +817,6 @@ DEALINGS IN THE SOFTWARE.
972
817
 
973
818
  Used by:
974
819
 
975
- - tracing-core 0.1.36 — https://github.com/tokio-rs/tracing
976
-
977
- ```
978
- The MIT License (MIT)
979
-
980
- Copyright (c) 2014 Mathijs van de Nes
981
-
982
- Permission is hereby granted, free of charge, to any person obtaining a copy
983
- of this software and associated documentation files (the "Software"), to deal
984
- in the Software without restriction, including without limitation the rights
985
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
986
- copies of the Software, and to permit persons to whom the Software is
987
- furnished to do so, subject to the following conditions:
988
-
989
- The above copyright notice and this permission notice shall be included in all
990
- copies or substantial portions of the Software.
991
-
992
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
993
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
994
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
995
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
996
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
997
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
998
- SOFTWARE.
999
-
1000
- ```
1001
-
1002
- ## MIT License
1003
-
1004
- Used by:
1005
-
1006
820
  - typenum 1.20.1 — https://github.com/paholg/typenum
1007
821
 
1008
822
  ```
@@ -1034,7 +848,7 @@ SOFTWARE.
1034
848
 
1035
849
  Used by:
1036
850
 
1037
- - unicode-ident 1.0.24 — https://github.com/dtolnay/unicode-ident
851
+ - unicode-ident 1.0.27 — https://github.com/dtolnay/unicode-ident
1038
852
 
1039
853
  ```
1040
854
  UNICODE LICENSE V3
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/shinolab/autd3-sdk.git",
6
6
  "directory": "bindings/unity/com.shinolab.autd3-sdk.modulation"
7
7
  },
8
- "version": "0.9.0",
8
+ "version": "0.13.0",
9
9
  "displayName": "AUTD3 Modulation",
10
10
  "description": "AUTD3 amplitude modulation waveforms (Unity binding).",
11
11
  "unity": "6000.0",
@@ -15,6 +15,6 @@
15
15
  "url": "https://github.com/shinolab"
16
16
  },
17
17
  "dependencies": {
18
- "com.shinolab.autd3-sdk.core": "0.9.0"
18
+ "com.shinolab.autd3-sdk.core": "0.13.0"
19
19
  }
20
20
  }