diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h index 68d5796ca55ec7112c46267dbd91abbd03d174b4..249891cf9f8660a374a36155b8704d7e413ced5d 100644 --- a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h +++ b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h @@ -228,6 +228,17 @@ OH_AudioStream_Result OH_AudioCapturer_GetTimestamp(OH_AudioCapturer* capturer, * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. */ OH_AudioStream_Result OH_AudioCapturer_GetFramesRead(OH_AudioCapturer* capturer, int64_t* frames); + +/** + * @brief Gets the overflow count on this stream. + * + * @param capturer Capturer generated by OH_AudioStreamBuilder_GenerateCapturer() + * @param count Pointer to a variable that will be set for the overflow count number. + * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @since 12 + */ +OH_AudioStream_Result OH_AudioCapturer_GetOverflowCount(OH_AudioCapturer* capturer, uint32_t* count); + #ifdef __cplusplus } #endif diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index be164c362cc675cc1fb4e1ba3517ceb46d2bbb7f..0a04b37954a86d960e4173da605e1586747f8116 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -304,6 +304,16 @@ OH_AudioStream_Result OH_AudioRenderer_SetMarkPosition(OH_AudioRenderer* rendere */ OH_AudioStream_Result OH_AudioRenderer_CancelMark(OH_AudioRenderer* renderer); +/** + * @brief Gets the underflow count on this stream. + * + * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer() + * @param count Pointer to a variable to receive the underflow count number. + * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error. + * @since 12 + */ +OH_AudioStream_Result OH_AudioRenderer_GetUnderflowCount(OH_AudioRenderer* renderer, uint32_t* count); + #ifdef __cplusplus } #endif diff --git a/multimedia/audio_framework/ohaudio.ndk.json b/multimedia/audio_framework/ohaudio.ndk.json index 9365cd644c5e64ca0d48efa26ad4e22c770693ca..39b8be0ecdcd047950d53cfec9514a8d6f63ad97 100644 --- a/multimedia/audio_framework/ohaudio.ndk.json +++ b/multimedia/audio_framework/ohaudio.ndk.json @@ -214,5 +214,13 @@ { "first_introduced": "12", "name": "OH_AudioRenderer_CancelMark" + }, + { + "first_introduced": "12", + "name": "OH_AudioRenderer_GetUnderflowCount" + }, + { + "first_introduced":"12", + "name": "OH_AudioCapturer_GetOverflowCount" } ]