File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 22
33- Add ` Sample::bits_per_sample ` method.
44- Update ` audio_thread_priority ` to 0.34.
5+ - AAudio: Configure buffer to ensure consistent callback buffer sizes.
56- ALSA: Improve ` BufferSize::Fixed ` latency precision and audio callback performance.
67- ALSA: Change ` BufferSize::Default ` to use the device defaults.
78- ALSA: Change card enumeration to work like ` aplay -L ` does.
Original file line number Diff line number Diff line change @@ -217,7 +217,9 @@ fn configure_for_device(
217217 builder = builder. sample_rate ( config. sample_rate . 0 . try_into ( ) . unwrap ( ) ) ;
218218 match & config. buffer_size {
219219 BufferSize :: Default => builder,
220- BufferSize :: Fixed ( size) => builder. buffer_capacity_in_frames ( * size as i32 ) ,
220+ BufferSize :: Fixed ( size) => builder
221+ . frames_per_data_callback ( * size as i32 )
222+ . buffer_capacity_in_frames ( ( * size * 2 ) as i32 ) , // Double-buffering
221223 }
222224}
223225
You can’t perform that action at this time.
0 commit comments