Skip to content

Commit 1cd15f8

Browse files
committed
document default buffer size/latency
1 parent 338d0d8 commit 1cd15f8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/stream.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@
55
//!
66
//! There is also a convenience function `play` for using that output mixer to
77
//! play a single sound.
8+
//!
9+
//! # Buffer size
10+
//! Rodio configures a default buffer size of 100ms latency regardless of the
11+
//! system default. This is to get a good _"out of the box experience"_ on all
12+
//! systems as we found out that the system default is sometimes set completely
13+
//! wrong. That would lead to audio playback breaking apparently randomly on
14+
//! some systems.
15+
//!
16+
//! You can manually specify the buffer size if you want lower latency. For more
17+
//! info see [buffer_size](DeviceSinkBuilder::with_buffer_size).
18+
//!
19+
//! If you find a good way to reliably get a good buffer size on all platforms
20+
//! please contribute your solution to us!
821
use crate::common::{assert_error_traits, ChannelCount, SampleRate};
922
use crate::math::{nearest_multiple_of_two, nz};
1023
use crate::mixer::{mixer, Mixer};

0 commit comments

Comments
 (0)