# main does not build: the two ADPCM encoders landed on top of each other - #127
Merged
Conversation
… building #105 and #106 were each green on their own branch and collided on the squash commit no run ever saw. #106 added the span-based encoders in {Ima,Ms}AdpcmCodec.Encode.cs; #105 then rewrote {Ima,Ms}AdpcmCodec.cs to carry its own list-based encoders, re-declaring helpers the partial already had. Both public surfaces stay - AdpcmEncodeTests covers the list-based pair and AdpcmEncoderTests the span-based pair, so neither is dead. IMA: the two EncodeNibble bodies were the same quantizer, so the partial's copy goes and every caller uses the one in the main file; short widens to int. Its copies of QuickTimePacketBytes, QuickTimeSamplesPerPacket and StartIndexFor go for the same reason. MS: the two are genuinely different - the main file quantizes the residual directly, the partial searches all sixteen nibbles for the smallest error - so the partial's keeps its body and takes the name SearchNibble. Sharing the name was what made a short argument silently pick the search over the quantizer. DecodeNibble takes the predictor index by value now that it is no longer mutated per nibble, which is what the rewrite in #105 established.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainhas not built since #105 merged. #105 and #106 were each green on their own branch and collided on the squash commit no run ever saw — 7 compiler errors inCodec.ImaAdpcmandCodec.MsAdpcm.#106 added the span-based encoders in
{Ima,Ms}AdpcmCodec.Encode.cs; #105 then rewrote{Ima,Ms}AdpcmCodec.csto carry its own list-based encoders, re-declaring helpers the partial already had.Both public surfaces stay —
AdpcmEncodeTestscovers the list-based pair,AdpcmEncoderTeststhe span-based pair, so neither is dead.EncodeNibblebodies were the same quantizer, so the partial's copy goes and every caller uses the one in the main file (shortwidens toint). Its copies ofQuickTimePacketBytes,QuickTimeSamplesPerPacketandStartIndexForgo for the same reason.SearchNibble; sharing the name was what let ashortargument silently pick the search over the quantizer.DecodeNibbletakes the predictor index by value now that it is no longer mutated per nibble.Verified locally:
dotnet build -c Releaseclean, and 122 ADPCM tests pass.