Skip to content

[Bug/Performance] BPM detection failure and latency at high sample rates (96kHz - 192kHz) #2

@Kyrr3

Description

@Kyrr3
  1. Description
    There is a significant performance regression when the system audio output is set to high sample rates. The issue is strictly tied to the Sample Rate, while Bit Depth (16-bit vs 24-bit vs 32-bit) appears to have no impact.

    当系统音频输出设置为高采样率时,出现明显的性能退化。问题完全由采样率引起,位深(16-bit 或 24-bit 或 32-bit)对此无影响。

     96kHz: Detection becomes noticeably slow and laggy.
    
     192kHz: The software fails to recognize the BPM entirely.
    
  2. Steps to Reproduce
    1.Open Windows Sound Settings and set the default format of the playback device to 24-bit/192kHz.

    2.Launch BPM Sniffer and play audio.

    3.Observe that no BPM is detected.

    4.Change the format to 24-bit/96kHz; observe that detection works but with significant delay.

    5.Change the format to 16-bit/44.1kHz or 24-bit/44.1kHz; observe that detection is instant and normal.

  3. Environment
    OS: Windows 11 (25H2)

    Audio Device: Moondrop Dawn Pro 2 DAC

    Software Version: v1.1.9

    CPU: Intel Core i7-14650HX

    GPU: NVIDIA RTX 4060 Laptop

  4. Technical Analysis (Optional)
    The issue seems to be caused by the increased computational load of processing more sample points per second. At 192kHz, the data throughput is ~4.35x higher than at 44.1kHz, which likely exceeds the current FFT buffer capacity or the real-time processing window of the software.

    问题似乎是由于每秒处理的采样点增加导致的计算负载过高。在 192kHz 下,数据吞吐量约是 44.1kHz 的 4.35 倍,这可能超出了目前的 FFT 缓冲区容量或软件的实时处理窗口。

  5. Suggestion
    Maybe consider downsampling the input audio stream to a fixed rate (e.g., 44.1kHz) before performing BPM analysis to ensure consistent performance regardless of the output device settings.

    建议:考虑在进行 BPM 分析之前,先将输入的音频流降采样到固定频率(如 44.1kHz),以确保无论输出设备设置如何,性能都能保持一致。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions