Hi Team,
I want to understand is low latency mode supported in VIM4? If yes how we can we enable it??
Ref: - 音频延迟 | Android NDK | Android Developers
These two feature flags
android.hardware.audio.low_latency
and android.hardware.audio.pro
Hi Team,
I want to understand is low latency mode supported in VIM4? If yes how we can we enable it??
Ref: - 音频延迟 | Android NDK | Android Developers
These two feature flags
android.hardware.audio.low_latency
and android.hardware.audio.pro
use configure interface in the MediaCodec.java
MediaCodec codec = MediaCodec.createByCodecName(name);
MediaFormat format = new MediaFormat;
…
codec.configure(format, …);
use setParameters interface in the MediaCodec.java
Bundle bundle = new Bundle();
MediaCodec codec = MediaCodec.createByCodecName(name);
setParameters(bundle);
…
MediaFormat format = null;
…
MediaCodecList mcl = new MediaCodecList(MediaCodecList.ALL_CODECS);
String decoderName = mcl.findDecoderForFormat(format);
…
MediaCodecWrapper decoder = null;
if (useNdk) {
decoder = new NdkMediaCodec(decoderName);
} else {
decoder = new SdkMediaCodec(MediaCodec.createByCodecName(decoderName));
}
decoder.configure(format, 0 /* flags */, surface);