There's lots of bits like this, where it should really be cross platform but isn't.
In my opinion, what's the point of having a cross platform IDE, when some functions aren't available cross platform?
It's a bit like cutting a hole in the bottom of your boat to let the water out: not very logical.
There should at least be equivalent functions for Windows and Linux.
Like with the macOS, this needs Quicktime ( for Widows) installed on Windows for it to work properly there, Which is software that Apple no longer supports, and hasn't for some time now.
But using Win32's 'Media Control Interface' (MCI strings) it should be possible to script recording a sound to a file.
I have written a script to record sound to file using FFMPEG, which is cross platform but depending on how FFMPEG binary was built with optional includes switches, it can be fairly big (>150mb binary).
What I'd like to do eventually is replace the backend for Media related syntax, the commands and functions that relied on Quicktime, with support for a FOSS media engine (or two or three) instead ( I've been listening to Richard Stallman a lot lately.)