提交 e82147d6 编写于 作者: Z zhanhang

modify OH_AudioStream_Usage and OH_AudioStream_Content

Signed-off-by: Nzhanhang <zhanhang2@huawei.com>
上级 e03db841
...@@ -590,8 +590,7 @@ static napi_value AudioRenderGetRendererInfo(napi_env env, napi_callback_info in ...@@ -590,8 +590,7 @@ static napi_value AudioRenderGetRendererInfo(napi_env env, napi_callback_info in
OH_AudioRenderer *audioRenderer; OH_AudioRenderer *audioRenderer;
OH_AudioStreamBuilder_GenerateRenderer(builder, &audioRenderer); OH_AudioStreamBuilder_GenerateRenderer(builder, &audioRenderer);
OH_AudioStream_Usage usage; OH_AudioStream_Usage usage;
OH_AudioStream_Content content; OH_AudioStream_Result result = OH_AudioRenderer_GetRendererInfo(audioRenderer, &usage);
OH_AudioStream_Result result = OH_AudioRenderer_GetRendererInfo(audioRenderer, &usage, &content);
OH_AudioStreamBuilder_Destroy(builder); OH_AudioStreamBuilder_Destroy(builder);
napi_value res; napi_value res;
napi_create_int32(env, result, &res); napi_create_int32(env, result, &res);
...@@ -675,9 +674,8 @@ static napi_value AudioStreamBuilderSetRendererInfo(napi_env env, napi_callback_ ...@@ -675,9 +674,8 @@ static napi_value AudioStreamBuilderSetRendererInfo(napi_env env, napi_callback_
OH_AudioStreamBuilder* builder; OH_AudioStreamBuilder* builder;
OH_AudioStream_Type type = AUDIOSTREAM_TYPE_RENDERER; OH_AudioStream_Type type = AUDIOSTREAM_TYPE_RENDERER;
OH_AudioStreamBuilder_Create(&builder, type); OH_AudioStreamBuilder_Create(&builder, type);
OH_AudioStream_Usage usage = AUDIOSTREAM_USAGE_MEDIA; OH_AudioStream_Usage usage = AUDIOSTREAM_USAGE_MUSIC;
OH_AudioStream_Content content = AUDIOSTREAM_CONTENT_TYPE_MOVIE; OH_AudioStream_Result result = OH_AudioStreamBuilder_SetRendererInfo(builder, usage);
OH_AudioStream_Result result = OH_AudioStreamBuilder_SetRendererInfo(builder, usage, content);
OH_AudioStreamBuilder_Destroy(builder); OH_AudioStreamBuilder_Destroy(builder);
napi_value res; napi_value res;
...@@ -851,4 +849,4 @@ static napi_module g_module = { ...@@ -851,4 +849,4 @@ static napi_module g_module = {
extern "C" __attribute__((constructor)) void MyPixelMapRegisterModule(void) extern "C" __attribute__((constructor)) void MyPixelMapRegisterModule(void)
{ {
napi_module_register(&g_module); napi_module_register(&g_module);
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册