You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: language in getting started and make some noise
* fix: language in docs
Co-authored-by: Katarzyna Smoleń <katarzyna.smolen@swmansion.com>
---------
Co-authored-by: Katarzyna Smoleń <katarzyna.smolen@swmansion.com>
Copy file name to clipboardExpand all lines: packages/audiodocs/docs/fundamentals/getting-started.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,20 +8,20 @@ import TabItem from '@theme/TabItem';
8
8
9
9
# Getting started
10
10
11
-
The goal of _Fundamentals_ is to guide You through setup proces of Audio API as well as show base concepts standing behind audio programming using web audio framework to give you the confidence to explore more advanced use cases on your own. This section is packed with interactive examples, code snippets and explanations. Are you ready? Let's make some noise!
11
+
The goal of _Fundamentals_ is to guide you through the setup process of the Audio API, as well as to show the basic concepts behind audio programming using a web audio framework, giving you the confidence to explore more advanced use cases on your own. This section is packed with interactive examples, code snippets, and explanations. Are you ready? Let's make some noise!
12
12
13
13
## What is React Native Audio API?
14
14
15
-
React Native Audio API is a powerful high-performant and low-level audio library built by [Software Mansion](https://swmansion.com/).
15
+
React Native Audio API is a powerful, high-performant and low-level audio library built by [Software Mansion](https://swmansion.com/).
16
16
RN Audio API is fully compatible\* with [Web Audio specification](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API), making it easy to write audio-intensive applications for iOS, Android and Web with just one codebase.
17
17
18
18
## Installation
19
19
20
-
It takes only a few steps to add audio api to Your project:
20
+
It takes only a few steps to add Audio API to your project:
21
21
22
22
### Install the package
23
23
24
-
Install `react-native-audio-api` package from npm:
24
+
Install the `react-native-audio-api` package from npm:
25
25
26
26
<TabsgroupId="package-managers">
27
27
<TabItemvalue="expo"label="EXPO"default>
@@ -62,7 +62,7 @@ To learn more about expo development builds, please check out [Development Build
62
62
63
63
#### Android
64
64
65
-
No additional steps are necessary.
65
+
No further steps are necessary.
66
66
67
67
#### iOS
68
68
@@ -74,11 +74,11 @@ cd ios && pod install && cd ..
74
74
75
75
#### Web
76
76
77
-
No additional steps are necessary.
77
+
No further steps are necessary.
78
78
79
79
:::caution
80
80
81
-
`react-native-audio-api` on web, exposes browser built-in Web Audio API, but for compatibility between platforms, its limits available interfaces to APIs that are implemented on iOS and Android.
81
+
`react-native-audio-api` on the web exposes the browser's built-in Web Audio API, but for compatibility between platforms, it limits the available interfaces to APIs that are implemented on iOS and Android.
82
82
83
83
:::
84
84
@@ -104,4 +104,4 @@ No additional steps are necessary.
104
104
105
105
## What's next?
106
106
107
-
In [the next section](/fundamentals/lets-make-some-noise), we will learn how to prepare audio api and how to play some sound!.
107
+
In [the next section](/guides/lets-make-some-noise), we will learn how to prepare Audio API and to play some sound!.
Copy file name to clipboardExpand all lines: packages/audiodocs/docs/guides/lets-make-some-noise.mdx
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ sidebar_position: 2
4
4
5
5
# Let's make some noise!
6
6
7
-
In this section, we will guide you through the basic concepts of Audio API. We're going to use core audio components such as `AudioContext` and `AudioBufferSourceNode` to simply play sound from a file, which will help you develop a basic understanding of the library.
7
+
In this section, we will guide you through the basic concepts of Audio API. We are going to use core audio components such as `AudioContext` and `AudioBufferSourceNode` to simply play sound from a file, which will help you develop a basic understanding of the library.
8
8
9
9
## Using audio context
10
10
@@ -28,11 +28,11 @@ export default function App() {
28
28
}
29
29
```
30
30
31
-
`AudioContext` is object that controls both the creation of the nodes, as well as execution of the audio processing, or decoding.
31
+
`AudioContext` is an object that controls both the creation of the nodes and the execution of the audio processing or decoding.
32
32
33
-
## Loading audio file
33
+
## Loading an audio file
34
34
35
-
Before we will be able to play anything, we need to gain access to some audio data. For the purpose of this guide, we will first download it from remote source using expo [FileSystem](https://docs.expo.dev/versions/latest/sdk/filesystem/)`downloadAsync` API.
35
+
Before we can play anything, we need to gain access to some audio data. For the purpose of this guide, we will first download it from a remote source using [Expo FileSystem](https://docs.expo.dev/versions/latest/sdk/filesystem/)`downloadAsync` API.
36
36
37
37
```jsx {2,10-13}
38
38
importReactfrom'react';
@@ -58,11 +58,11 @@ export default function App() {
58
58
}
59
59
```
60
60
61
-
We have used `decodeAudioDataSource` method of the `AudioContext`, which takes url to local file or bundled audio asset and decodes it to raw audio data, that can be used within our system.
61
+
We have used the `decodeAudioDataSource` method of the `AudioContext`, which takes a URL to a local file or bundled audio asset and decodes it into raw audio data that can be used within our system.
62
62
63
63
## Play the audio
64
64
65
-
Last and final step is to create `AudioBufferSourceNode`, connect it to the `AudioContext` destination and start playing the sound. For the purpose of this guide, we will play the sound for only 10 seconds.
65
+
The last and final step is to create an `AudioBufferSourceNode`, connect it to the `AudioContext` destination, and start playing the sound. For the purpose of this guide, we will play the sound for just 10 seconds.
66
66
67
67
```jsx {15-16,18-20}
68
68
importReactfrom'react';
@@ -95,7 +95,7 @@ export default function App() {
95
95
}
96
96
```
97
97
98
-
And that's it! You have just played Your first sound using react-native-audio-api. You can hear how it works in the live example below:
98
+
And that's it! you have just played your first sound using react-native-audio-api. you can hear how it works in the live example below:
@@ -105,7 +105,7 @@ import LetsMakeSomeNoiseSrc from '!!raw-loader!@site/src/examples/LetsMakeSomeNo
105
105
106
106
:::info
107
107
108
-
In web environment you can use `decodeAudioDataSource` directly on the asset url, without the need to download it first.
108
+
In the web environment, you can use `decodeAudioDataSource` directly on the asset URL, without the need to download it first.
109
109
110
110
:::
111
111
@@ -114,11 +114,11 @@ In web environment you can use `decodeAudioDataSource` directly on the asset url
114
114
In this guide, we have learned how to create a simple audio player using `AudioContext` and `AudioBufferSourceNode` as well as how we can load audio data from a remote source. To sum up:
115
115
116
116
-`AudioContext` is the main object that controls the audio graph.
117
-
-`decodeAudioDataSource` method can be used to load audio data from a local audio source in form of `AudioBuffer`.
118
-
-`AudioBufferSourceNode` can be used to any `AudioBuffer`.
117
+
-the `decodeAudioDataSource` method can be used to load audio data from a local audio source in the form of an`AudioBuffer`.
118
+
-`AudioBufferSourceNode` can be used with any `AudioBuffer`.
119
119
- In order to hear the sounds, we need to connect the source node to the destination node exposed by `AudioContext`.
120
-
- We can control the playback of the sound using `start` and `stop` methods of the `AudioBufferSourceNode` (And other source nodes which we show later).
120
+
- We can control the playback of the sound using `start` and `stop` methods of the `AudioBufferSourceNode` (and other source nodes, which we will show later).
121
121
122
122
## What's next?
123
123
124
-
In [the next section](/fundamentals/making-a-piano-keyboard) we will learn more about how the audio graph works, what are audio params and how we can use them to create a simple piano keyboard.
124
+
In [the next section](/fundamentals/making-a-piano-keyboard), we will learn more about how the audio graph works, what audio parameters are, and how we can use them to create a simple piano keyboard.
0 commit comments