-
Notifications
You must be signed in to change notification settings - Fork 32
Description
- Fix offset miscalculation bug
Should be within this function: https://github.com/segfault-bilibili/DereTore/blob/c364976c6e38fb128dccab3aed1d3caf888114a8/Exchange/DereTore.Exchange.Audio.HCA/HcaDecoder.cs#L23
I probably know what's going on. GetMinWaveHeaderBufferSize() added the size of WaveSampleSection to the total header size. Then such WAV header probably failed to be written, which should be the unexpectedly inserted dozens of zero bytes, which will then confuse WAV parser/player.
However I still don't understand why the size recorded in WAVRIFF header doesn't seem to include WaveSampleSection...Now I just hesitate to write Copied what https://github.com/segfault-bilibili/hca.js is doing, won't hurt at least...WaveSampleSection - I don't know what this section is for, a simple solution would be just comment out that if (hcaInfo.LoopFlag) {...} lines in GetMinWaveHeaderBufferSize.
- [ ] Re-decode the "seam" block maybe this is not needed at all. Related: Nyagamon/HCADecoder#4