From e82147d62cc8dfc222ba8ee4b9329fe1b18a24bb Mon Sep 17 00:00:00 2001 From: zhanhang Date: Tue, 11 Jul 2023 10:29:12 +0800 Subject: [PATCH] modify OH_AudioStream_Usage and OH_AudioStream_Content Signed-off-by: zhanhang --- .../entry/src/main/cpp/napi/audioTest.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/multimedia/audio/audio_js_standard/audio_ndk_test/entry/src/main/cpp/napi/audioTest.cpp b/multimedia/audio/audio_js_standard/audio_ndk_test/entry/src/main/cpp/napi/audioTest.cpp index a40c964f7..bf7c17ddd 100644 --- a/multimedia/audio/audio_js_standard/audio_ndk_test/entry/src/main/cpp/napi/audioTest.cpp +++ b/multimedia/audio/audio_js_standard/audio_ndk_test/entry/src/main/cpp/napi/audioTest.cpp @@ -590,8 +590,7 @@ static napi_value AudioRenderGetRendererInfo(napi_env env, napi_callback_info in OH_AudioRenderer *audioRenderer; OH_AudioStreamBuilder_GenerateRenderer(builder, &audioRenderer); OH_AudioStream_Usage usage; - OH_AudioStream_Content content; - OH_AudioStream_Result result = OH_AudioRenderer_GetRendererInfo(audioRenderer, &usage, &content); + OH_AudioStream_Result result = OH_AudioRenderer_GetRendererInfo(audioRenderer, &usage); OH_AudioStreamBuilder_Destroy(builder); napi_value res; napi_create_int32(env, result, &res); @@ -675,9 +674,8 @@ static napi_value AudioStreamBuilderSetRendererInfo(napi_env env, napi_callback_ OH_AudioStreamBuilder* builder; OH_AudioStream_Type type = AUDIOSTREAM_TYPE_RENDERER; OH_AudioStreamBuilder_Create(&builder, type); - OH_AudioStream_Usage usage = AUDIOSTREAM_USAGE_MEDIA; - OH_AudioStream_Content content = AUDIOSTREAM_CONTENT_TYPE_MOVIE; - OH_AudioStream_Result result = OH_AudioStreamBuilder_SetRendererInfo(builder, usage, content); + OH_AudioStream_Usage usage = AUDIOSTREAM_USAGE_MUSIC; + OH_AudioStream_Result result = OH_AudioStreamBuilder_SetRendererInfo(builder, usage); OH_AudioStreamBuilder_Destroy(builder); napi_value res; @@ -851,4 +849,4 @@ static napi_module g_module = { extern "C" __attribute__((constructor)) void MyPixelMapRegisterModule(void) { napi_module_register(&g_module); -} \ No newline at end of file +} -- GitLab