AllenNeuralDynamics / AllenNeuralDynamics/harp.device.quac
Playing N > 1 FilePlayer File *Subsets* may fail
- 主要語言
- C#
- 星號
- 0
- 分支
- 0
- 平均合併
- 2 天 14 小時
- 30 天內合併 PR
- 8
描述
Playing multiple iterations of a *subset* of a FilePlayer Waveform may fail because it may need to loop back and read a non-multiple-of-512-bytes from the card.
This only happens if we read a subset of the full file (ie: the first 1 second of a 5 second waveform, etc.).
The reason is that the SD card library reads fastest when reading full sectors (512-bytes) from the card. If we do not read a multiple of 512 bytes, we may or may not be able to make the deadline before the double buffers switch. Currently, there is no error checking to indicate that there is a deadline failure.
Thankfully, this isn't going to happen frequently in most use cases since most users will opt to play the full file.
One fix is to internally buffer the SDCard `transfer_source_chunk` function so that read requests that are not multiples of 512 bytes are rounded up to the nearest 512 and cached internal to the FilePlayer. Since we don't have to worry about reading to the end of the card, this isn't actually that complicated to implement.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。