-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aplay: Improve overrun/underrun handling
Do not allow audio frames to accumulate in the FIFO, and do not block when writing to the ALSA PCM. By this means we prevent the delay from increasing much beyond our chosen buffer sizes, and ensure that if it becomes necessary to drop audio frames then we always drop only the oldest ones. Avoid underruns on the ALSA PCM as far as possible by inserting silence when there are not enough frames available to maintain the ALSA buffer fill level above the period size. Use the BlueALSA PCM "running" property to detect when the transport becomes idle. This avoids closing the ALSA PCM whenever an unstable Bluetooth link causes a short break in the stream, allowing bluealsa-aplay to play silence to keep the ALSA stream running. When the transport becomes idle, drain the ALSA PCM before closing it to ensure that all audio frames are played out.
- Loading branch information
Showing
4 changed files
with
147 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters