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
按赞同
/
按时间
rosytree

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
相关问题
OH _Audio播放音频问题
160浏览 • 1回复 待解决
Native Image模块API-OH_PixelMap_CreatePixelMap
155浏览 • 1回复 待解决
OH_NativeImage_UpdateSurfaceImage接口错误码
182浏览 • 1回复 待解决
请问鸿蒙和OH支持软总线互相通信吗
1457浏览 • 0回复 待解决
配置文件文档问题有懂吗?
1201浏览 • 1回复 待解决
华为鸿蒙动了谁蛋糕?
4778浏览 • 1回复 待解决
对于获取权限api问题
211浏览 • 1回复 待解决
PolarDB诊断功能是怎样
1369浏览 • 1回复 待解决
PolarDB监控功能是怎样
1663浏览 • 1回复 待解决