@@ -192,29 +192,29 @@ impl LimitSettings {
192192 }
193193
194194 /// Creates settings optimized for dynamic content like music and sound effects.
195- ///
195+ ///
196196 /// Designed for content with varying dynamics where you want to preserve
197197 /// the natural feel while preventing occasional peaks from clipping.
198- ///
198+ ///
199199 /// # Configuration
200- ///
200+ ///
201201 /// - **Threshold**: -3.0 dBFS (more headroom than default)
202202 /// - **Knee width**: 6.0 dB (wide, transparent transition)
203203 /// - **Attack**: 5 ms (default, balanced response)
204204 /// - **Release**: 100 ms (default, smooth recovery)
205- ///
205+ ///
206206 /// # Use Cases
207- ///
207+ ///
208208 /// - Music playback with occasional loud peaks
209209 /// - Sound effects that need natural dynamics
210210 /// - Content where transparency is more important than tight control
211211 /// - Game audio with varying intensity levels
212- ///
212+ ///
213213 /// # Examples
214- ///
214+ ///
215215 /// ```
216216 /// use rodio::source::{SineWave, Source, LimitSettings};
217- ///
217+ ///
218218 /// let music = SineWave::new(440.0).amplify(1.5);
219219 /// let limited = music.limit(LimitSettings::dynamic_content());
220220 /// ```
@@ -226,30 +226,30 @@ impl LimitSettings {
226226 }
227227
228228 /// Creates settings optimized for broadcast and streaming applications.
229- ///
229+ ///
230230 /// Designed for consistent loudness and reliable peak control in scenarios
231231 /// where clipping absolutely cannot occur and consistent levels are critical.
232- ///
232+ ///
233233 /// # Configuration
234- ///
234+ ///
235235 /// - **Threshold**: -1.0 dBFS (default, tight control)
236236 /// - **Knee width**: 2.0 dB (narrower, more decisive limiting)
237237 /// - **Attack**: 3 ms (faster response to catch transients)
238238 /// - **Release**: 50 ms (faster recovery for consistent levels)
239- ///
239+ ///
240240 /// # Use Cases
241- ///
241+ ///
242242 /// - Live streaming where clipping would be catastrophic
243243 /// - Broadcast audio that must meet loudness standards
244244 /// - Voice chat applications requiring consistent levels
245245 /// - Podcast production for consistent listening experience
246246 /// - Game voice communication systems
247- ///
247+ ///
248248 /// # Examples
249- ///
249+ ///
250250 /// ```
251251 /// use rodio::source::{SineWave, Source, LimitSettings};
252- ///
252+ ///
253253 /// let voice_chat = SineWave::new(440.0).amplify(2.0);
254254 /// let limited = voice_chat.limit(LimitSettings::broadcast());
255255 /// ```
@@ -262,116 +262,116 @@ impl LimitSettings {
262262 }
263263
264264 /// Creates settings optimized for mastering and final audio production.
265- ///
265+ ///
266266 /// Designed for the final stage of audio production where tight peak control
267267 /// is needed while maintaining audio quality and preventing any clipping.
268- ///
268+ ///
269269 /// # Configuration
270- ///
270+ ///
271271 /// - **Threshold**: -0.5 dBFS (very tight, maximum loudness)
272272 /// - **Knee width**: 1.0 dB (narrow, precise control)
273273 /// - **Attack**: 1 ms (very fast, catches all transients)
274274 /// - **Release**: 200 ms (slower, maintains natural envelope)
275- ///
275+ ///
276276 /// # Use Cases
277- ///
277+ ///
278278 /// - Final mastering stage for tight peak control
279279 /// - Preparing audio for streaming platforms (after loudness processing)
280280 /// - Album mastering where consistent peak levels are critical
281281 /// - Audio post-production for film/video
282- ///
282+ ///
283283 /// # Examples
284- ///
284+ ///
285285 /// ```
286286 /// use rodio::source::{SineWave, Source, LimitSettings};
287- ///
287+ ///
288288 /// let master_track = SineWave::new(440.0).amplify(3.0);
289289 /// let mastered = master_track.limit(LimitSettings::mastering());
290290 /// ```
291291 #[ inline]
292292 pub fn mastering ( ) -> Self {
293293 Self {
294- threshold : -0.5 , // Very tight for peak control
295- knee_width : 1.0 , // Narrow knee for precise control
296- attack : Duration :: from_millis ( 1 ) , // Very fast attack
297- release : Duration :: from_millis ( 200 ) , // Slower release for natural envelope
294+ threshold : -0.5 , // Very tight for peak control
295+ knee_width : 1.0 , // Narrow knee for precise control
296+ attack : Duration :: from_millis ( 1 ) , // Very fast attack
297+ release : Duration :: from_millis ( 200 ) , // Slower release for natural envelope
298298 }
299299 }
300300
301301 /// Creates settings optimized for live performance and real-time applications.
302- ///
302+ ///
303303 /// Designed for scenarios where low latency is critical and the limiter
304304 /// must respond quickly to protect equipment and audiences.
305- ///
305+ ///
306306 /// # Configuration
307- ///
307+ ///
308308 /// - **Threshold**: -2.0 dBFS (some headroom for safety)
309309 /// - **Knee width**: 3.0 dB (moderate, good compromise)
310310 /// - **Attack**: 0.5 ms (extremely fast for protection)
311311 /// - **Release**: 30 ms (fast recovery for live feel)
312- ///
312+ ///
313313 /// # Use Cases
314- ///
314+ ///
315315 /// - Live concert sound reinforcement
316316 /// - DJ mixing and live electronic music
317317 /// - Real-time audio processing where latency matters
318318 /// - Equipment protection in live settings
319319 /// - Interactive audio applications and games
320- ///
320+ ///
321321 /// # Examples
322- ///
322+ ///
323323 /// ```
324324 /// use rodio::source::{SineWave, Source, LimitSettings};
325- ///
325+ ///
326326 /// let live_input = SineWave::new(440.0).amplify(2.5);
327327 /// let protected = live_input.limit(LimitSettings::live_performance());
328328 /// ```
329329 #[ inline]
330330 pub fn live_performance ( ) -> Self {
331331 Self {
332- threshold : -2.0 , // Some headroom for safety
333- knee_width : 3.0 , // Moderate knee
334- attack : Duration :: from_micros ( 500 ) , // Extremely fast for protection
335- release : Duration :: from_millis ( 30 ) , // Fast recovery for live feel
332+ threshold : -2.0 , // Some headroom for safety
333+ knee_width : 3.0 , // Moderate knee
334+ attack : Duration :: from_micros ( 500 ) , // Extremely fast for protection
335+ release : Duration :: from_millis ( 30 ) , // Fast recovery for live feel
336336 }
337337 }
338338
339339 /// Creates settings optimized for gaming and interactive audio.
340- ///
340+ ///
341341 /// Designed for games where audio levels can vary dramatically between
342342 /// quiet ambient sounds and loud action sequences, requiring responsive
343343 /// limiting that maintains immersion.
344- ///
344+ ///
345345 /// # Configuration
346- ///
346+ ///
347347 /// - **Threshold**: -3.0 dBFS (balanced headroom for dynamic range)
348348 /// - **Knee width**: 3.0 dB (moderate transition for natural feel)
349349 /// - **Attack**: 2 ms (fast enough for sound effects, not harsh)
350350 /// - **Release**: 75 ms (quick recovery for interactive responsiveness)
351- ///
351+ ///
352352 /// # Use Cases
353- ///
353+ ///
354354 /// - Game audio mixing for consistent player experience
355355 /// - Interactive audio applications requiring dynamic response
356356 /// - VR/AR audio where sudden loud sounds could be jarring
357357 /// - Mobile games needing battery-efficient processing
358358 /// - Streaming gameplay audio for viewers
359- ///
359+ ///
360360 /// # Examples
361- ///
361+ ///
362362 /// ```
363363 /// use rodio::source::{SineWave, Source, LimitSettings};
364- ///
364+ ///
365365 /// let game_audio = SineWave::new(440.0).amplify(2.0);
366366 /// let limited = game_audio.limit(LimitSettings::gaming());
367367 /// ```
368368 #[ inline]
369369 pub fn gaming ( ) -> Self {
370370 Self {
371- threshold : -3.0 , // Balanced headroom for dynamics
372- knee_width : 3.0 , // Moderate for natural feel
373- attack : Duration :: from_millis ( 2 ) , // Fast but not harsh
374- release : Duration :: from_millis ( 75 ) , // Quick for interactivity
371+ threshold : -3.0 , // Balanced headroom for dynamics
372+ knee_width : 3.0 , // Moderate for natural feel
373+ attack : Duration :: from_millis ( 2 ) , // Fast but not harsh
374+ release : Duration :: from_millis ( 75 ) , // Quick for interactivity
375375 }
376376 }
377377
0 commit comments