audioLowLatencyOutputFrameSize property

Future<int> get audioLowLatencyOutputFrameSize

Get the audio low-latency output frame size (Android only).

On iOS this returns 0.

Returns

  • The frame size in samples, or 0 when not supported.

Implementation

static Future<int> get audioLowLatencyOutputFrameSize async {
  if (GemKitPlatform.instance.androidVersion > -1) {
    final dynamic resultString = await GemKitPlatform.instance
        .getChannel(mapId: -1)
        .invokeMethod<String>(
          'callObjectMethod',
          jsonEncode(<String, dynamic>{
            'id': 0,
            'class': 'SoundService',
            'method': 'getAudioLowLatencyOutputFrameSize',
            'args': <String, dynamic>{},
          }),
        );
    final dynamic result = jsonDecode(resultString!);
    return result['result'];
  } else {
    final OperationResult result = staticMethod(
      'SoundService',
      'getAudioLowLatencyOutputFrameSize',
    );
    return result['result'];
  }
}