Skip to content

Commit

Permalink
bluealsa-aplay manual page extra detail
Browse files Browse the repository at this point in the history
The time drift caused by rounding errors in the ALSA rate plugin
has led to a number of issues being raised by users. This change
introduces a hint on how to avoid these rounding errors by
carefully choosing the ALSA PCM period time.
  • Loading branch information
borine committed Sep 11, 2021
1 parent aac8742 commit 1deff43
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions doc/bluealsa-aplay.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ OPTIONS

--pcm-buffer-time=INT
Set the playback PCM buffer duration time to *INT* microseconds.
The default is 500000.
The default is 500000. It is recommended to choose a buffer time that is
an exact multiple of the period time to avoid potential issues with some
ALSA plugins (see --pcm-period-time option below).
ALSA may choose the nearest available alternative if the requested value is
not supported.

Expand All @@ -83,7 +85,12 @@ OPTIONS
period sizes. This can result in stream underruns (if the effective rate is
too fast) or dropped A2DP frames in the **bluealsa(8)** server (if the
effective rate is too slow). Increase the period time with this option if
this problem occurs.
this problem occurs. This effect is avoided if the selected period time
results in an exact number of frames at both sample rates. For example, in
the case of bluetooth stream sampled at 48000Hz playing to a hardware
device that supports only 44100Hz, choosing a period time that is a
multiple of 10000 microseconds will result in zero rounding error.
(10000 µs @ 48000Hz is 480 frames, and @ 44100Hz is 441 frames).

-M NAME, --mixer=NAME
Select ALSA mixer device to use for controlling audio output mute state
Expand Down

0 comments on commit 1deff43

Please sign in to comment.