![]() > mixer.init() #Initialize the mixer, this will allow the next command to work > from pygame import mixer #Playing sound Then: > from pygame._sdl2 import get_num_audio_devices, get_audio_device_name #Get playback device names ![]() Then run this command in cmd: pip install pygame=2.0.0.dev8 (or py -m pip install pygame=2.0.0.dev8, depending on your installation of python) [Also the reason it's the dev version is that it requires some functions only in sdl2, whereas the main branch uses sdl1) (Also from what I know this specific answer only works on Windows, but it should be similar on Linux with PulseAudio instead of VB-Audio Cable, but I'm not a daily Linux user so I don't know.)įirst download:, this will create a "Virtual Audio Cable" where programs can play music to the input device (What looks like a speaker) and it'll pipe it to the output device (What looks like a microphone). ![]() It is possible but it isn't 100% in python as it requires the installation of other software.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |