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
If you receive errors about no default input or output device:
137
137
138
-
-**Linux/ALSA:** Ensure your user is in the `audio` group and that ALSA is properly configured
139
138
-**Linux/PipeWire:** Check that PipeWire is running: `pw-cli info`
140
139
-**Linux/PulseAudio:** Check that PulseAudio is running: `pulseaudio --check`
141
140
-**macOS:** Check System Preferences > Sound for available devices
142
141
-**Mobile (iOS/Android):** Ensure your app has microphone/audio permissions
143
142
-**Windows:** Verify your audio device is enabled in Sound Settings
144
143
144
+
## ALSA, PipeWire, and PulseAudio
145
+
146
+
When PipeWire or PulseAudio is running, it holds the ALSA `default` device exclusively. A second stream attempting to open it via the ALSA backend will fail with a `DeviceBusy` error. To route audio through the sound server via ALSA, use the bridge devices `pipewire` or `pulse` instead of `default`. Better yet, use the `pipewire` or `pulseaudio` cpal features for native integration.
147
+
148
+
Reserve `hw:` and `plughw:` device names for targets that have no sound server. On those targets, ensure the user is a member of the `audio` group if the system does not grant audio device access automatically via `logind`.
149
+
145
150
### Buffer Size Issues
146
151
147
-
If you experience audio glitches or dropouts:
152
+
`BufferSize::Default` uses the system-configured device default, which on **ALSA** can range from a PipeWire quantum (typically 1024 frames) to `u32::MAX` on misconfigured or exotic hardware. A very deep buffer causes samples to be consumed far faster than audible playback, making audio appear to fast-forward ahead of actual output.
153
+
154
+
Configure the system and/or request a fixed size in your application:
155
+
156
+
| System | File | Setting |
157
+
|--------|------|---------|
158
+
| ALSA |`~/.asoundrc` or `/etc/asound.conf`|`buffer_size`, `periods` * `period_size`|
0 commit comments