Closed TurboAnonym closed 3 years ago
Nice well done :clap: I missed that PR and now it conflicts with a PR I merged today. Do you mind solving the conflict and squashing everything to a single commit so I can merge?
Haha all that git stuff took me some time to figure out ;) Finally it worked 😁
Split up!
I have much more to contribute besides the already added audio session notification. But before that, the code needs to be split up properly otherwise it all gets too cluttered.
i divided the pycaw.pycaw.py file after following pattern:
I did not add any new Features (yet)
... so it should be easy to understand and follow the split.
Its relativly easy to check if i did everything correct, by copy and pasting everything again.
when you do this you might find REFERENCE_TIME and UINT32 missing, but i renamed them on import: pycaw\api\audioclient__init__.py
... but i sure made everything work as expected. Here is the test output:
volume.GetVolumeRange()' expected output has been adjusted on my computer to (-96.0, 0.0, 1.5) instead of (-95.25, 0.0, 0.75)
Imports from one module to another and external libraries
I added in the first step for each newly created module all possible imports, and removed the unused later with:
autoflake --remove-all-unused-imports
(not in place, but with manual double checking) So each module has the minimum amount of imports.