From 55bfeeed8d0358a728ded34dbfde1b8f120c6a6c Mon Sep 17 00:00:00 2001 From: johnthagen Date: Tue, 23 May 2017 19:51:21 -0400 Subject: [PATCH] Add chunksize parameter documentation. --- src/sdl2/mixer/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sdl2/mixer/mod.rs b/src/sdl2/mixer/mod.rs index 3986f025..a85f9c29 100644 --- a/src/sdl2/mixer/mod.rs +++ b/src/sdl2/mixer/mod.rs @@ -187,6 +187,12 @@ pub fn init(flags: InitFlag) -> Result { /// Open the mixer with a certain audio format. +/// +/// * `chunksize`: It is recommended to choose values between 256 and 1024, depending on whether +/// you prefer latency or compatibility. Small values reduce latency but may not +/// work very well on older systems. For instance, a chunk size of 256 will give +/// you a latency of 6ms, while a chunk size of 1024 will give you a latency of 23ms +/// for a frequency of 44100kHz. pub fn open_audio(frequency: i32, format: AudioFormat, channels: i32,