You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
audio->fb_val_min= ((TUSB_SPEED_FULL==tud_speed_get() ? (f_s/1000) : (f_s/8000)) -1) << 16; // Minimal value in 16.16 format for full speed (1ms per frame) or high speed (125 us per frame)
2100
+
audio->fb_val_max= ((TUSB_SPEED_FULL==tud_speed_get() ? (f_s/1000) : (f_s/8000)) +1) << 16; // Maximum value in 16.16 format
feedback= ((n_cylces-audio->fb_n_cycles_old) << 3) *audio->fb_param_factor_N / audio->fb_param_factor_D; // feeback_param_factor_N has scaling factor of 13 bits, n_cycles 3 and feeback_param_factor_D 1, hence 16.16 precision
2140
2145
#endif
2141
2146
2142
-
// Buffer count checks ?
2147
+
// For Windows: https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers
2148
+
// The size of isochronous packets created by the device must be within the limits specified in FMT-2.0 section 2.3.1.1. This means that the deviation of actual packet size from nominal size must not exceed +/- one audio slot (audio slot = channel count samples).
2143
2149
2144
-
// Magic checks - where are they from?
2145
-
if (feedback>2949166){ // 45.0007 in 16.16 format
2146
-
feedback=2949166;
2150
+
if (feedback>audio->fb_val_max){
2151
+
feedback=audio->fb_val_max;
2147
2152
}
2148
-
if ( feedback<2883630) {// 44.0007 in 16.16 format
0 commit comments