Skip to content

Display and control your Android device

Set default audio-output-buffer to 10ms

Romain Vimontb5cc6f2be515
diff --git a/app/scrcpy.1 b/app/scrcpy.1
index b6423c28..a3437019 100644
--- a/app/scrcpy.1
+++ b/app/scrcpy.1
@@ -87,9 +87,9 @@ Default is output.
.BI "\-\-audio\-output\-buffer " ms
Configure the size of the SDL audio output buffer (in milliseconds).
-If you get "robotic" audio playback, you should test with a higher value (10). Do not change this setting otherwise.
+Do not change this setting unless you have a good reason.
-Default is 5.
+Default is 10.
.TP
.BI "\-b, \-\-video\-bit\-rate " value
diff --git a/app/src/cli.c b/app/src/cli.c
index e4076529..46a69231 100644
--- a/app/src/cli.c
+++ b/app/src/cli.c
@@ -241,9 +241,8 @@ static const struct sc_option options[] = {
.argdesc = "ms",
.text = "Configure the size of the SDL audio output buffer (in "
"milliseconds).\n"
- "If you get \"robotic\" audio playback, you should test with "
- "a higher value (10). Do not change this setting otherwise.\n"
- "Default is 5.",
+ "Do not change this setting unless you have a good reason.\n"
+ "Default is 10.",
},
{
.shortopt = 'b',
diff --git a/app/src/options.c b/app/src/options.c
index 10ad471f..deff9b6c 100644
--- a/app/src/options.c
+++ b/app/src/options.c
@@ -66,7 +66,7 @@ const struct scrcpy_options scrcpy_options_default = {
.display_id = 0,
.video_buffer = 0,
.audio_buffer = -1, // depends on the audio format,
- .audio_output_buffer = SC_TICK_FROM_MS(5),
+ .audio_output_buffer = SC_TICK_FROM_MS(10),
.time_limit = 0,
.screen_off_timeout = -1,
#ifdef HAVE_V4L2
diff --git a/doc/audio.md b/doc/audio.md
index 142626f5..3ea51743 100644
--- a/doc/audio.md
+++ b/doc/audio.md
@@ -188,12 +188,11 @@ scrcpy --video-buffer=200 --audio-buffer=200
```
It is also possible to configure another audio buffer (the audio output buffer),
-by default set to 5ms. Don't change it, unless you get some [robotic and glitchy
-sound][#3793]:
+by default set to 10ms. Do not change this setting unless you have a good reason
+(see [robotic and glitchy sound][#3793]). For instance:
```bash
-# Only if absolutely necessary
-scrcpy --audio-output-buffer=10
+scrcpy --audio-output-buffer=5
```
[#3793]: https://github.com/Genymobile/scrcpy/issues/3793