Is there any way to record the output sound from speakers on Windows/MacOS? [closed]

  audio, audio-recording, c++, python

I’d like to record the sound from speakers on macOS and Windows. Is there any library and examples of how to do this without additional settings in configurations of OS? Python or C++ would be preferred.

Source: Windows Questions C++