bastibe / SoundCard

A Pure-Python Real-Time Audio Library
https://soundcard.readthedocs.io
BSD 3-Clause "New" or "Revised" License
689 stars 70 forks source link

pactl load-module module-pipe-source #75

Closed LuKks closed 4 years ago

LuKks commented 4 years ago

Hello, I was checking the documentation but I don't see a way to "load module". In Linux I'm doing it in the next way but I would like an equivalent for Mac OS and Windows:

pactl load-module module-pipe-source source_name=virtual-mic file=/tmp/virtual-mic format=s16le rate=44100 channels=1

There is a way to do that with SoundCard library?

bastibe commented 4 years ago

Do you still need help with this issue?

LuKks commented 4 years ago

Oh, thank you! Only if you don't need to spend too much time to help me :) I also think it's a great feature for the library anyway.

bastibe commented 4 years ago

SoundCard does not offer any direct control of pulse audio, beyond recording and playing--and even that only in one particular mode. It really only uses pulse as an implementation detail, and only on Linux. So I'm afraid no specific interaction with pulse is possible through SoundCard.

In general, I would like to keep it as cross-platform as possible, and only implement features that can be supported on Windows, Linux, and macOS. So these kinds of platform-specific features are not what I built SoundCard for. Sorry.

LuKks commented 4 years ago

That is the idea, get it working cross-platform because in Linux normally there is PulseAudio + the previous command then I get my own virtual input. Maybe in Mac and Windows there is another command/way to achieve the same (create a virtual input).

Anyway, I really appreciate your response and this issue is not very important so, thank you.

bastibe commented 4 years ago

Oh, you can use SoundCard to monitor your outputs (on Linux and Windows anyway) if you search for recorders with include_loopback=True.

Alternatively, there is https://www.vb-audio.com/Cable/index.htm for Windows and https://github.com/mattingalls/Soundflower for macOS. These are the tools I use for testing SoundCard.