From 6f56d2ed1af5df72b2032b75429db408b1034e49 Mon Sep 17 00:00:00 2001 From: xross Date: Tue, 21 Jun 2022 19:29:20 +0100 Subject: [PATCH] Fixed issue with 44.1k etc in sync mode --- lib_xua/src/core/buffer/ep/ep_buffer.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index a57c89dd..0a1e050c 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -520,7 +520,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out, static unsigned syncPinVal = 0; framesPerSec = (usbSpeed == XUD_SPEED_HS) ? 8000 : 1000; - float float_clocks = sampleFreq/framesPerSec ; + float float_clocks = (float) sampleFreq/framesPerSec ; clocks = (unsigned) (float_clocks * (1 << 16)); asm volatile("stw %0, dp[g_speed]"::"r"(clocks));