Improved Audio Beep Test (#2026)

This commit is contained in:
Mark Thompson
2024-03-23 02:21:35 -05:00
committed by GitHub
parent ba4290cf0d
commit 28a5fc5915
10 changed files with 43 additions and 21 deletions

View File

@@ -27,7 +27,7 @@
// Functions for audio beep (used by Sonde RSSI)
void ToneGen::configure_beep(const uint32_t freq, const uint32_t sample_rate) {
f_delta_ = (float)(freq * sizeof(sine_table_i8)) / sample_rate;
f_tone_phase_ = 0.0;
f_tone_phase_ = sizeof(sine_table_i8) / 4; // Start at sine peak to handle case of freq=sample_rate/2
}
int16_t ToneGen::process_beep() {