Commit d4adab6
authored
Fixes wav files written with WavWriter.h to be complete (#663)
* Fixes wav files written with WavWriter.h to be complete
Before the transfer buffer was not flushed so wav header files would say the file was a certain size but actually it would be smaller because the full data was not written to the wav file. This would result in perfect loops being recalled imperfectly. See https://github.com/willemOH/daisy_looper/tree/main commits for debugging which proves this behavior.
* Improves reliability of multiple consecutive writes
before, the first write would be exact, but subsequent writes would introduce artifacts or inaccuracies to the wav file as compared to recording into a buffer. Powercycling would solve this but not ideal. Now, after 5 writes, there is usually not artefacts or differences between wav file and equivalent buffer. Although occasionally this isn't true so this isn't a complete fix and the issue should be looked into by someone who knows more about this class and fatfs than I.1 parent 785ebb5 commit d4adab6
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
148 | 159 | | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
152 | 170 | | |
153 | 171 | | |
154 | 172 | | |
| |||
0 commit comments