小编bre*_*dev的帖子

在 Google 发布者 api Subscriptions.Get 上获取错误 400 测试订阅自动续订

我正在尝试使用 Google Publisher API 对我的 Android 应用程序的订阅进行后端升级/降级操作。

我在 Alpha 通道中发布了该应用程序,并让一些测试人员进行“测试”购买。在生成订阅的同一天,一切看起来都很好。我可以使用购买令牌查看有效数据,调用方法:

Purchases.Subscriptions.Get
Run Code Online (Sandbox Code Playgroud)

我的问题是,当“测试”订阅自动续订(第二天)时,看起来购买令牌不再可用,当我调用该方法时:

Purchases.Subscriptions.Get
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

购买令牌与包名称不匹配。[400]

看起来当“测试”订阅自动续订时,购买令牌也会发生变化。

  • 有人有我同样的问题吗?
  • 有什么想法为什么购买令牌会在订阅自动续订时发生变化吗?
  • 即使在自动续订后,购买令牌不应该始终保持不变吗?

android in-app-purchase android-inapp-purchase

5
推荐指数
0
解决办法
1164
查看次数

将 Raspberry pi 上用 .NetCore C# 录制的音频保存到 Wav 文件

我发现很难找到一种方法将使用 OpenTk.NetStandard 捕获的音频存储到 NetCore C# 中正确的 .WAV 文件中。

我正在寻找一种在 Raspberry pi 上运行时有效的解决方案,因此 NAudio 或任何 Windows 特定方法都无法解决我的问题。

我发现了其他几个 SO 答案,它们展示了如何使用 opentk 捕获音频,但没有介绍如何将其存储在 wav 文件中。

这是代码的摘录,该代码应该从我从另一个问题中获取的麦克风中读取数据,我看到 AudioCapture 类是:

  const byte SampleToByte = 2;
  short[] _buffer = new short[512];
  int _sampling_rate = 16000;
  double _buffer_length_ms = 5000;
  var _recorders = AudioCapture.AvailableDevices;
  int buffer_length_samples = (int)((double)_buffer_length_ms  * _sampling_rate * 0.001 / BlittableValueType.StrideOf(_buffer));

  using (var audioCapture = new AudioCapture(_recorders.First(), _sampling_rate, ALFormat.Mono16, buffer_length_samples))
  {
      audioCapture.Start();
      int available_samples = audioCapture.AvailableSamples;        

      _buffer = new short[MathHelper.NextPowerOfTwo((int)(available_samples * SampleToByte / …
Run Code Online (Sandbox Code Playgroud)

opentk audio-capture .net-core

3
推荐指数
1
解决办法
2128
查看次数