Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/audiodocs/docs/core/base-audio-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sidebar_position: 1

import { Optional, ReadOnly, MobileOnly } from '@site/src/components/Badges';
import DecodeAudioDataDocs from '@site/src/components/DecodeAudioDataDocs/DecodeAudioDataDocs';
import Heading from '@theme/Heading';

# BaseAudioContext

Expand Down Expand Up @@ -90,7 +91,7 @@ Creates [`AudioBufferSourceNode`](/docs/sources/audio-buffer-source-node).

**Returns:** `AudioBufferSourceNode`

### `createBufferQueueSource` <MobileOnly />
<Heading as="h3" id="create-buffer-queue-source"><code>createBufferQueueSource</code> <MobileOnly /></Heading>

Creates [`AudioBufferQueueSourceNode`](/docs/sources/audio-buffer-queue-source-node).

Expand Down
2 changes: 1 addition & 1 deletion packages/audiodocs/docs/effects/gain-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ gainNode.gain.linearRampToValueAtTime(1, audioContext.currentTime + 2);

## Advanced usage — Envelope (ADSR)

`GainNode` is the key building block for implementing sound envelopes. For a practical, step-by-step walkthrough of ADSR envelopes and how to apply them in a real app, see the [Piano keyboard](/docs/guides/making-a-piano-keyboard#envelopes-%EF%B8%8F) guide.
`GainNode` is the key building block for implementing sound envelopes. For a practical, step-by-step walkthrough of ADSR envelopes and how to apply them in a real app, see the [Piano keyboard](/docs/guides/making-a-piano-keyboard#envelopes) guide.
3 changes: 2 additions & 1 deletion packages/audiodocs/docs/fundamentals/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sidebar_position: 2

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Heading from '@theme/Heading';

# Getting started

Expand Down Expand Up @@ -107,7 +108,7 @@ There are many ways to do that, for example, using git bash. To make sure just t
bash -c 'echo Hello World!'
```

### Step 4: Additional dependencies (optional)
<Heading as="h3" id="additional-dependencies">Step 4: Additional dependencies (optional)</Heading>

If you plan to use any of [`WorkletNode`](/docs/worklets/worklet-node), [`WorkletSourceNode`](/docs/worklets/worklet-source-node), or [`WorkletProcessingNode`](/docs/worklets/worklet-processing-node), install [`react-native-audio-worklets`](https://github.com/software-mansion/react-native-audio-api/tree/main/packages/react-native-audio-worklets) and [`react-native-worklets`](https://www.npmjs.com/package/react-native-worklets) `>= 0.10.0`. Follow the [react-native-worklets setup guide](https://docs.swmansion.com/react-native-worklets/docs/fundamentals/getting-started) for Babel and native configuration, then see the [Worklets](/docs/worklets/introduction) section for usage.

Expand Down
2 changes: 1 addition & 1 deletion packages/audiodocs/docs/inputs/audio-recorder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ interface AudioRecorderFileOptions {
- `rotateIntervalBytes` - The threshold size (in bytes) at which the recorder will start writing to a new file. If set to `0` (default), file output rotation is disabled. When active, new files are named with the original prefix appended with a timestamp. You can join the rotated files after recording with [`concatAudioFiles`](/docs/utils/file-concatenation#concataudiofiles).
- Use a large enough value for your format. Very small thresholds rotate often, which increases the chance of audible gaps or muffled joins after concatenation — especially for **M4A**, where each segment is a separate AAC encode.
- Practical starting points: **≥ 1 MB** for WAV, **≥ 200 KB** for M4A (adjust upward if you still hear artifacts at segment boundaries).
- This option controls segment file size, not RAM usage. For crash-resilience tuning on Android, use [`androidFlushIntervalMs`](#androidflushintervalms) instead.
- This option controls segment file size, not RAM usage. For crash-resilience tuning on Android, use `androidFlushIntervalMs` instead.
- `format` - The desired extension and file format of the recorder file. Check: [FileFormat](#fileformat) below.
- `preset` - The desired recorder file properties, you can use either one of built-in properties or tweak low-level parameters yourself. Check [FilePresetType](#filepresettype) for more details.
- `directory` - Either `FileDirectory.Cache` or `FileDirectory.Document` (default: `FileDirectory.Cache`). Determines the system directory that the file will be saved to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ constructor(context: BaseAudioContext, options?: AudioBufferQueueSourceOptions)
| `pitchCorrection` <Optional /> | `boolean` | `false` | Enables the pitch correction algorithm when changing [`playbackRate`](/docs/sources/audio-buffer-queue-source-node#properties). |

:::info
You can also create an `AudioBufferQueueSourceNode` via [`BaseAudioContext.createBufferQueueSource()`](/docs/core/base-audio-context#createbufferqueuesource), which uses default values.
You can also create an `AudioBufferQueueSourceNode` via [`BaseAudioContext.createBufferQueueSource()`](/docs/core/base-audio-context#create-buffer-queue-source), which uses default values.
:::

:::caution
Expand Down Expand Up @@ -127,7 +127,7 @@ Removes all buffers from the queue. Note that [`onBufferEnded`](audio-buffer-que

#### Returns `undefined`.

### `start` <Overridden /> {#start}
### `start` <Overridden /> {"#start"}

Schedules the `AudioBufferQueueSourceNode` to start playback of enqueued [`AudioBuffers`](/docs/sources/audio-buffer), or starts to play immediately.

Expand Down
4 changes: 2 additions & 2 deletions packages/audiodocs/docs/sources/audio-buffer-source-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Optional, Overridden, MobileOnly } from '@site/src/components/Badges';
import InteractivePlayground from '@site/src/components/InteractivePlayground';
import { useAudioBufferSourcePlayground } from '@site/src/components/InteractivePlayground/AudioBufferSourceExample/useAudioBufferSourcePlayground';
import { useGainAdsrPlayground } from '@site/src/components/InteractivePlayground/GainAdsrExample/useGainAdsrPlayground';

import Heading from '@theme/Heading';

# AudioBufferSourceNode

Expand Down Expand Up @@ -126,7 +126,7 @@ source.start(startTime - latency);
```
</details>

### `start` <Overridden /> {#start}
<Heading as="h3" id="start"><code>start</code> <Overridden /></Heading>

Schedules the `AudioBufferSourceNode` to start playback of audio data contained in the associated [`AudioBuffer`](/docs/sources/audio-buffer), or starts to play immediately.

Expand Down
3 changes: 2 additions & 1 deletion packages/audiodocs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const config = {
projectName: 'react-native-audio-api', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
onBrokenMarkdownLinks: 'throw',
onBrokenAnchors: 'throw',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
Expand Down
Loading