bugfix: Pico W build.

This commit is contained in:
Antti Pohjola
2026-05-13 14:04:56 +03:00
parent bbf50b09eb
commit 9cf52a0665
4 changed files with 19 additions and 5 deletions
+2 -1
View File
@@ -64,6 +64,7 @@ void audio_loop() {
const float audio_gain = mute[0] ? 0.0f : powf(10.0f, get_config().speaker_volume / 20.0f);
const float haptics_gain = get_config().haptics_gain;
for (int i = 0; i < nframes; i++) {
#if !DISABLE_SPEAKER_PROC
audio_buf[audio_buf_pos++] = raw[i * INPUT_CHANNELS] / 32768.0f * audio_gain;
audio_buf[audio_buf_pos++] = raw[i * INPUT_CHANNELS + 1] / 32768.0f * audio_gain;
if (audio_buf_pos == 512 * 2) {
@@ -77,7 +78,7 @@ void audio_loop() {
}
audio_buf_pos = 0;
}
#endif
in_buf[i * 2] = static_cast<WDL_ResampleSample>(clamp(raw[i * INPUT_CHANNELS + 2] / 32768.0f * haptics_gain,
-1.0f, 1.0f));
in_buf[i * 2 + 1] = static_cast<WDL_ResampleSample>(clamp(raw[i * INPUT_CHANNELS + 3] / 32768.0f * haptics_gain,
+1 -1
View File
@@ -191,7 +191,7 @@ void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t rep
int main() {
vreg_set_voltage(VREG_VOLTAGE_1_20);
sleep_ms(1000);
set_sys_clock_khz(320000, true);
set_sys_clock_khz(SYS_CLOCK_KHZ, true);
board_init();
tusb_rhport_init_t dev_init = {