diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 6ad655177ad96299d6a6ffab73d5bbe12ed98aee..8a59ae479dcfb6e43fde1e87d0bb2a715c4a041e 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -243,6 +243,10 @@ OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* render /** * Query the the time at which a particular frame was presented. * + * It is recommended to use new api {@link OH_AudioRenderer_GetAudioTimestampInfo} + * because it adapts to playback speed change, but current api does not. The + * increasing speed for position will not change when speed become fast. + * * @since 10 * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() @@ -517,6 +521,9 @@ OH_AudioStream_Result OH_AudioRenderer_SetDefaultOutputDevice( * This interface also adapts to playback speed change. For example, the increseing speed for * position will be double for 2x speed playback. * + * For video synchronization usage, there is a best practice document for developer to refer + * **AV Synchronization**. + * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param framePosition Pointer to a variable to receive the position * @param timestamp Pointer to a variable to receive the timestamp diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index acd0beba1f731ccdecaf783566d68ab09e3ed9bc..ceaff1f711474497cd97d45b0cb42a5e09cd29a0 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -276,17 +276,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBu * When using AudioRenderer apis, there are many instructions for application * to achieve better performance and lower power consumption: * In music or audiobook background playback situation, you can have low power - * consumption by following this best practices document [Low-Power Rules in Music Playback Scenarios]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-music-playback-scenarios}. - * And for navigation situation, you can follow [Low-Power Rules in Navigation and Positioning Scenarios]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-navigation-scenarios}. + * consumption by following this best practices document **Low-Power Rules in Music Playback Scenarios**. + * And for navigation situation, you can follow **Low-Power Rules in Navigation and Positioning Scenarios**. * * Application developer should also be careful when app goes to background, please check if your audio playback - * is still needed, see [Audio Resources]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-reasonable-audio-use}. - * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take - * control measures when this behavior is detected, see [Audio Playback]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-reasonable-audio-playback-use}. + * is still needed, see **Audio Resources** in best practices document. + * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take + * control measures when this behavior is detected, see **Audio Playback** in best practices document. + * + * If you want to use AudioRenderer api to implement a music playback application, there are also many interactive + * scenes to consider, see **Developing an Audio Application** in best practices document. * * @since 10 *