This is freebie text mode Python code to generate an audio signal at the speakers/headphone_sockets of MacBook Pros.
However it has been tested on Windows 32 bit, Ubuntu and Debian. So, is proving to be platform independent...