#鸿蒙通关秘籍#OHAudio音频播放1CH-8KHZ-16BIT中参数配置问题

OH_AudioStreamBuilder_SetFrameSizeInCallback(builder, 320); // 设置320,实际是640

设置320,实际回调640,设置640,实际回调1280。

/*

  • Set the data frame size for each callback, use this function if the application requires a specific number
  • of frames for processing.
  • The frame size should be at least the size device process at one time, and less than half the internal
  • buffer capacity.

  • @since 11

  • @param builder Reference provided by OH_AudioStreamBuilder_Create()
  • @param frameSize The data frame size for each callback.
  • @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error./ OH_AudioStream_Result OH_AudioStreamBuilder_SetFrameSizeInCallback(OH_AudioStreamBuilderbuilder, int32_t frameSize);

frameSize是采样数还是字节数?

鸿蒙
2024-11-29 11:34:50
浏览
收藏 0
回答 0
待解决
相关问题
OHAudio实现低时延音频录制和播放功能
1574浏览 • 1回复 待解决
HarmonyOS音频播放问题
393浏览 • 1回复 待解决
HarmonyOS 音频后台播放问题
439浏览 • 1回复 待解决
OH _Audio播放音频问题
2102浏览 • 1回复 待解决
HarmonyOS 音频播放相关问题咨询
150浏览 • 1回复 待解决