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 1
1
# Unreleased
2
2
3
+ - ALSA(process_output): pass ` silent=true ` to ` PCM.try_recover ` , so it doesn't write to stderr
4
+
3
5
# Version 0.16.0 (2025-06-07)
4
6
5
7
- 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(
870
870
loop {
871
871
match stream. channel . io_bytes ( ) . writei ( buffer) {
872
872
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 ) ;
876
882
}
877
883
Err ( err) => {
878
884
error_callback ( err. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments