Fixed issue with 44.1k etc in sync mode

This commit is contained in:
xross
2022-06-21 19:29:20 +01:00
parent e6a8527631
commit 6f56d2ed1a

View File

@@ -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));