Closed nlefler closed 10 years ago
This PR is not mergeable. Could you fix that?
I'm unclear why this refactor is better than the current version. It is 70 lines longer, provides no obvious benefit, and does not make the code more clear. Could you provide arguments for its inclusion?
I'm unclear why this refactor is better than the current version. It is 70 lines longer, provides no obvious benefit, and does not make the code more clear. Could you provide arguments for its inclusion?
It moves byte offsets into named constants for better readability and testing. It breaks the Wav struct into separate header and data structs which will allow for representing the wav data in different manners later (e.g. the streaming wav change). Moving the header validation, header initialization, and sample reading code into functions makes the code easier to read, allows for extension later, and makes testing possible.
This PR is not mergeable. Could you fix that?
I don't see where GitHub is saying it's unmergable. Is that true for the latest diff?
It says it right above where I'm typing this message. It's still unmergeable.
Merged commits from master. Hopefully it'll auto-merge now. However I'm not happy about the commit history at this point. Would you rather I rebased?
Up to you, but I'd be ok with a rebase.
Fixed up commits
Moved constants out, some refactoring of sample extraction. Added unit tests for reading wavs.