OH_AudioStreamBuilder_SetRendererInfo的用处

参考这里设置https://www.seaxiang.com/blog/2f4fdf3dc1a5419f847f8abe15708017,并没有介绍OH_AudioStreamBuilder_SetRendererInfo的使用场景,这个api的用途是什么呢?对于播放器来说,入参应该是多少

/** 
 
 Define the audio stream usage. 
 Audio stream usage is used to describe what work scenario 
 the current stream is used for. 
 @since 10 
 / 
 typedef enum { 
 /* 
 Unknown usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_UNKNOWN = 0, 
 /* 
 Music usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_MUSIC = 1, 
 /* 
 Voice communication usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_VOICE_COMMUNICATION = 2, 
 /* 
 Voice assistant usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_VOICE_ASSISTANT = 3, 
 /* 
 Alarm usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_ALARM = 4, 
 /* 
 Voice message usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_VOICE_MESSAGE = 5, 
 /* 
 Ringtone usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_RINGTONE = 6, 
 /* 
 Notification usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_NOTIFICATION = 7, 
 /* 
 Accessibility usage, such as screen reader. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_ACCESSIBILITY = 8, 
 /* 
 Movie or video usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_MOVIE = 10, 
 /* 
 Game sound effect usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_GAME = 11, 
 /* 
 Audiobook usage. 
 @since 10 
 / 
 AUDIOSTREAM_USAGE_AUDIOBOOK = 12, 
 /* 
 Navigation usage. 
 @since 10 
 */ 
AUDIOSTREAM_USAGE_NAVIGATION = 13, 
} OH_AudioStream_Usage;
HarmonyOS
2024-05-07 22:53:00
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
励志做个有为人

OH_AudioStreamBuilder_SetRendererInfo接口可以设置不同的流类型。设置为音乐或通话类型,当该流start起来后,框架会自动识别为音乐或通话模式。 OH_AudioStream_Usage 枚举值描述: AUDIOSTREAM_USAGE_UNKNOWN 未定义。 AUDIOSTREAM_USAGE_MUSIC 音乐。 AUDIOSTREAM_USAGE_COMMUNICATION 通话。 AUDIOSTREAM_USAGE_GAME 游戏。

分享
微博
QQ
微信
回复
2024-05-08 16:39:00
相关问题
如何判断应用处于前后台
321浏览 • 1回复 待解决
HarmonyOS 关于OH_AudioRenderer问题
283浏览 • 1回复 待解决
OH _Audio播放音频问题
2014浏览 • 1回复 待解决
OH_ImageNative转为cv::Mat
222浏览 • 1回复 待解决
oh-package.json5实现动态依赖方式
651浏览 • 1回复 待解决
如何释放OH_AVCapability类型资源?
96浏览 • 1回复 待解决
OH_NativeImage_UpdateSurfaceImage接口错误码
1530浏览 • 1回复 待解决
Native Image模块API-OH_PixelMap_CreatePixelMap
1602浏览 • 1回复 待解决
app级oh_module和module下有什么区别
357浏览 • 1回复 待解决