mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 05:35:02 -05:00
Add feedback not based on samples used, but on buffers filled - idea
being we can do "PID" (someone who has actually implemented Real PID
could probably rewrite the calculation) based on how many buffers
we have filled versus the ideal buffer filled level (16).
Feedback is based on a historical average of the last two feedback
intervals.
This feedback math is done as fixed-point math to keep floats out of core. Note that a couple division operations needed to be strategically staged to avoid overflow or truncation.
Floats are still used for debug screen printout.
Also fixed a typo in the definition of usb_audio_control_request()
Host:
Linux: works
MacOS: works
Windows: Feedback does not work! It appears that Windows may not
support asynchronous devices at all. Playback may "work",
but results will vary as the number of buffers filled will
drift over time.
Change-Id: I027feb16705e6e46c1144b1d08920b53de42cb26
|
||
|---|---|---|
| .. | ||
| usb_audio.c | ||
| usb_audio.h | ||
| usb_audio_def.h | ||
| usb_charging_only.c | ||
| usb_charging_only.h | ||
| usb_class_driver.h | ||
| usb_core.c | ||
| usb_hid.c | ||
| usb_hid.h | ||
| usb_hid_usage_tables.h | ||
| usb_serial.c | ||
| usb_serial.h | ||
| usb_storage.c | ||
| usb_storage.h | ||