mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-27 08:33:45 +08:00
Mark NumPy sinc as an intentional API name
This commit is contained in:
@@ -267,7 +267,7 @@ def tici_speaker_samples(samples: np.ndarray) -> np.ndarray:
|
||||
def tici_disengage_samples(samples: np.ndarray) -> np.ndarray:
|
||||
"""Lighten the existing disengage chime at load time, preserving its timing."""
|
||||
taps = np.arange(2049, dtype=np.float64) - 1024
|
||||
lowpass = 2 * 700 / 48000 * np.sinc(2 * 700 / 48000 * taps) * np.hamming(len(taps))
|
||||
lowpass = 2 * 700 / 48000 * np.sinc(2 * 700 / 48000 * taps) * np.hamming(len(taps)) # codespell:ignore sinc
|
||||
lowpass /= lowpass.sum()
|
||||
bass = np.convolve(samples, lowpass, mode="full")[1024:1024 + len(samples)]
|
||||
result = samples.astype(np.float64) - 0.65 * bass
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "09fdf36a9ad3246d38d3ae0cebdc21015478148b152a867452236248c7f8edac", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "adf59bd7b9cd343277a08a6a395b373350fbb4461fcb7bc0e556b855dbdacf28", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user