y-brehm / waveAlign

Python repo for audio loudness matching in order to end the loudness war between DJs.
3 stars 0 forks source link

Refactor mp3processor/source/main.c #49

Open SimonZimmer opened 3 weeks ago

SimonZimmer commented 3 weeks ago

This is still ~600 lines of very dirty C code we need to refactor.

I started a bit on this with mp3processor/cyclic_redundancy_check.c and would propose to continue like this until we have the file separated following SRP.

We are safeguarded by tests/integration/test_mp3_processor.py which makes sure the compiled executable behaves as expected. (We just need to remember to always compile the executable before running the python test)

I'd also suggest to follow the pattern of including a comment on top of each separated file so we can explain to each other what the purpose of certain functions is (this is often not obvious for bit operations like we use here)

We can also discuss spreading the work of refactoring among us. We'd just need to tolerate merge conflicts then 😁