File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11# Unreleased
22
3+ - ALSA(process_output): pass ` silent=true ` to ` PCM.try_recover ` , so it doesn't write to stderr
4+
35# Version 0.16.0 (2025-06-07)
46
57- Migrate from ` oboe ` to ` ndk::audio ` . ** NOTE:** This raises the minimum Android API version to 26 (Android 8/Oreo).
Original file line number Diff line number Diff line change @@ -870,9 +870,15 @@ fn process_output(
870870 loop {
871871 match stream. channel . io_bytes ( ) . writei ( buffer) {
872872 Err ( err) if err. errno ( ) == libc:: EPIPE => {
873- // buffer underrun
874- // TODO: Notify the user of this.
875- let _ = stream. channel . try_recover ( err, false ) ;
873+ // ALSA underrun or overrun.
874+ // See https://github.com/alsa-project/alsa-lib/blob/b154d9145f0e17b9650e4584ddfdf14580b4e0d7/src/pcm/pcm.c#L8767-L8770
875+ // Even if these recover successfully, they still may cause audible glitches.
876+
877+ // TODO:
878+ // Should we notify the user about successfully recovered errors?
879+ // Should we notify the user about failures in try_recover, rather than ignoring them?
880+ // (Both potentially not real-time-safe)
881+ _ = stream. channel . try_recover ( err, true ) ;
876882 }
877883 Err ( err) => {
878884 error_callback ( err. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments