提交 cd489024 编写于 作者: W wusongqing

updated docs

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 51d54997
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
- [Audio Playback Development](audio-playback.md) - [Audio Playback Development](audio-playback.md)
- [Audio Playback Development Using AudioRenderer](audio-renderer.md) - [Audio Rendering Development](audio-renderer.md)
- [Audio Recording Development](audio-recorder.md) - [Audio Recording Development](audio-recorder.md)
- [Audio Recorder Development Using AudioCapturer](audio-capturer) - [Audio Capture Development](audio-capturer)
- Video - Video
......
# Audio Recorder Development Using AudioCapturer # Audio Capture Development
--- ---
## ***Note***: ## ***Note***:
...@@ -41,7 +41,7 @@ Here's an example of how to use AudioCapturer to capture a raw audio file. ...@@ -41,7 +41,7 @@ Here's an example of how to use AudioCapturer to capture a raw audio file.
2. (Optional) Subscribe to audio capturer state change events using the **on('stateChange')** API. 2. (Optional) Subscribe to audio capturer state change events using the **on('stateChange')** API.
If an application wants to take some action based on the state updates in capturer, the application can subscribe to the state change event. If an application wants to take some action based on the state updates in capturer, the application can subscribe to the state change event.
There are more events that applications can subscribe to, such as 'markReach' and 'periodReach'. Refer to [**js-apis-audio.md**](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-audio.md) for more details. There are more events that applications can subscribe to, such as 'markReach' and 'periodReach'. Refer to [Audio](../reference/apis/js-apis-audio.md) for more details.
``` ```
audioCapturer.on('stateChange',(state) => { audioCapturer.on('stateChange',(state) => {
console.info('AudioCapturerLog: Changed State to : ' + state) console.info('AudioCapturerLog: Changed State to : ' + state)
...@@ -149,4 +149,4 @@ That is, the AudioCapturer has an internal state that the application must alway ...@@ -149,4 +149,4 @@ That is, the AudioCapturer has an internal state that the application must alway
The system may throw an error/exception or generate other undefined behaviour if the application performs an operation while capturer is in an improper state. The system may throw an error/exception or generate other undefined behaviour if the application performs an operation while capturer is in an improper state.
## **Other APIs** ## **Other APIs**
See [**js-apis-audio.md**](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-audio.md) for more useful APIs like **getAudioTime**, **getCapturerInfo** and **getStreamInfo**. See [AudioCapturer in the Audio API](../reference/apis/js-apis-audio.md) for more useful APIs like **getAudioTime**, **getCapturerInfo** and **getStreamInfo**.
...@@ -16,7 +16,7 @@ You can use audio playback APIs to convert audio data into audible analog signal ...@@ -16,7 +16,7 @@ You can use audio playback APIs to convert audio data into audible analog signal
## How to Develop ## How to Develop
For details about the APIs used for audio playback, see [js-apis-media.md](../reference/apis/js-apis-media.md). For details about the APIs used for audio playback, see [AudioPlayer in the Media API](../reference/apis/js-apis-media.md).
### Full-Process Scenario ### Full-Process Scenario
......
# Audio Playback Development Using AudioRenderer # Audio Rendering Development
--- ---
## ***Note***: ## ***Note***:
...@@ -17,7 +17,7 @@ When a higher priority stream wants to play, the AudioRenderer framework interru ...@@ -17,7 +17,7 @@ When a higher priority stream wants to play, the AudioRenderer framework interru
For example, if a call is arrived when you listen to music, the music playback, which is the lower priority stream, is paused.\ For example, if a call is arrived when you listen to music, the music playback, which is the lower priority stream, is paused.\
With the sample code below, we'll look at how AudioInterrupt works in detail.\ With the sample code below, we'll look at how AudioInterrupt works in detail.\
<br/> <br/>
Please see [**js-apis-audio.md**](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-audio.md) for a list of supported audio stream types and formats, such as AudioSampleFormat, AudioChannel, AudioSampleFormat, and AudioEncodingType. Please see [AudioRenderer in the Audio API](../reference/apis/js-apis-audio.md#audiorenderer8) for a list of supported audio stream types and formats, such as AudioSampleFormat, AudioChannel, AudioSampleFormat, and AudioEncodingType.
## **Usage** ## **Usage**
...@@ -267,8 +267,8 @@ The system may throw an error/exception or generate other undefined behaviour if ...@@ -267,8 +267,8 @@ The system may throw an error/exception or generate other undefined behaviour if
## **Asynchronous Operations:** ## **Asynchronous Operations:**
Most of the AudioRenderer calls are asynchronous. As a result, the UI thread will not be blocked.\ Most of the AudioRenderer calls are asynchronous. As a result, the UI thread will not be blocked.\
For each API, the framework provides both callback and promises functions.\ For each API, the framework provides both callback and promises functions.\
In the example, promise functions are used for simplicity. [**js-apis-audio.md**](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-audio.md) In the example, promise functions are used for simplicity. [AudioRender in the Audio API](../reference/apis/js-apis-audio.md#audiorenderer8)
provides reference for both callback and promise. provides reference for both callback and promise.
## **Other APIs:** ## **Other APIs:**
See [**js-apis-audio.md**](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-audio.md) for more useful APIs like getAudioTime, drain, and getBufferSize. See [Audio](../reference/apis/js-apis-audio.md) for more useful APIs like getAudioTime, drain, and getBufferSize.
...@@ -16,7 +16,7 @@ During video recording, audio and video signals are captured, encoded, and saved ...@@ -16,7 +16,7 @@ During video recording, audio and video signals are captured, encoded, and saved
## How to Develop ## How to Develop
For details about the APIs used for video recording, see [js-apis-media.md](../reference/apis/js-apis-media.md). For details about the APIs used for video recording, see [VideoRecorder in the Media API](../reference/apis/js-apis-media.md).
### Full-Process Scenario ### Full-Process Scenario
......
...@@ -149,9 +149,9 @@ ...@@ -149,9 +149,9 @@
- Audio - Audio
- [Audio Overview](media/audio-overview.md) - [Audio Overview](media/audio-overview.md)
- [Audio Playback Development](media/audio-playback.md) - [Audio Playback Development](media/audio-playback.md)
- [Audio Playback Development Using AudioRenderer](media/audio-renderer.md) - [Audio Rendering Development](media/audio-renderer.md)
- [Audio Recording Development](media/audio-recorder.md) - [Audio Recording Development](media/audio-recorder.md)
- [Audio Recorder Development Using AudioCapturer](media/audio-capturer) - [Audio Capture Development](media/audio-capturer)
- Video - Video
- [Video Playback Development](media/video-playback.md) - [Video Playback Development](media/video-playback.md)
- [Video Recording Development](media/video-recorder.md) - [Video Recording Development](media/video-recorder.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册