Previously the total_duration function calculated the total duration by multiplying instead of deviding by the factor
Causing the total duration to increase as speed factors increased instead of the other way round .
I have fixed this
- Link to CONTRIBUTING.md in project root
- New Integration Tests section:
- Avoid sound output in tests
- Tips for testing audio sources
- Suggest examples for audible features
- Note challenges in automated audio testing
Specifically notes some example tests and how they test. Also mentions
sometimes you just have to listen, recommends adding example for that.
Author: dvdsk <noreply@davidsk.dev>
Date: Sat Oct 5 02:06:39 2024 +0200
- Encourage use of temporary unit tests during development
- Clarify that rough, non-comprehensive tests are acceptable
- Allow inclusion of temporary tests in pull requests
- Explain rationale for removing tests before final merge:
- Easier refactoring
- Reduced necessity due to Rust's type system
- Maintain instruction to run tests with 'cargo test'
- Replace static parameters with AtomicF32 for thread-safe access
- Add methods to get Arc<AtomicF32> for release_coeff, attack_coeff, absolute_max_gain, and target_level
- Enable real-time modification of AGC parameters during playback
- Use Ordering::Relaxed for optimal low-latency performance
- Remove set_* methods in favor of direct atomic access
- Update internal methods to use atomic loads consistently
This change allows for dynamic adjustment of AGC parameters
without interrupting audio playback, improving real-time control
and responsiveness of the Automatic Gain Control system.
- Updated CircularBuffer implementation to allocate on the heap instead of the stack to prevent excessive stack usage (32KB) which can lead to stack overflow issues.
- Optimized index wrapping logic using bitwise operations, leveraging the fact that RMS_WINDOW_SIZE is a power of two for improved efficiency.
- Increase RMS_WINDOW_SIZE for more stable measurements of very low frequencies
- Replace MIN_ATTACK_COEFF with release_coeff for improved customizability
These changes provide better handling of low-frequency content and allow
developers more control over AGC behavior, particularly in attack/release
time adjustments.