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 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. Copied what https://github.com/segfault-bilibili/hca.js is doing, won't hurt at least...
- [ ] Re-decode the "seam" block maybe this is not needed at all. Related: Nyagamon/HCADecoder#4
Should be within this function: https://github.com/segfault-bilibili/DereTore/blob/c364976c6e38fb128dccab3aed1d3caf888114a8/Exchange/DereTore.Exchange.Audio.HCA/HcaDecoder.cs#L23I probably know what's going on.
GetMinWaveHeaderBufferSize()added the size ofWaveSampleSectionto 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 includeWaveSampleSection...Now I just hesitate to writeCopied 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 thatif (hcaInfo.LoopFlag) {...}lines inGetMinWaveHeaderBufferSize.- [ ] Re-decode the "seam" blockmaybe this is not needed at all. Related: Nyagamon/HCADecoder#4