P1 = Button(root, text='Som1', command=playsound1) # playsound1ī2 = Button(root, text='open file', bg="light green", command=browse2) # browser button 2ī2. Sound2 = (audio_file_name2)ī1 = Button(root, text='open file', bg="yellow", command=browse1) # browser button 1ī1.pack(anchor=CENTER) playing sound button 1 If audio_file_name2: # play sound if just not an empty string # we will also use the audio_file_name global variable Maybe include_loopbacks would be much better? "Monitors" is the pulseaudio terminology, but terminology was never pulse's strong suit.Ĭould you change your pull request to include the loopback devices in all_microphones with the exclude_monitors or include_loopbacks flag? It might require appending "Loopback" to the device name to differentiate them from the microphones.Īudio_file_name2 = filedialog.askopenfilename(filetypes=(("Audio Files", ".wav. I must conclude that exclude_monitors is currently the best way to go. Because of that, and the above cross-platform compatibility, I don't want to add all_loopbacks/ default_loopback after all. The problem is, however, that as far as I can tell, Core Audio on macOS does not support loopback devices at all. Audio Loop-back Mixer EVO 4’s audio loopback feature can be configured via its own dedicated audio loopback mixer software, enabling you to combine audio sources and quickly route them between software. The only reason I included exclude_monitors at all, is because it was so tremendously useful for testing. The maintenance burden of maintaining several different APIs is horrendous, and not something I want to do. I think it isn't that bad to just have separate functions for windows-specific functionality. From the point of view of SoundCard, however, they are clearly microphones, since you use them to record audio data. I can see that this is confusing, since loopback devices are both, speakers and microphones. "loopback devices" are actually speakers and not microphones Tl dr: The best solution would be to implement a new _Loopback class that inherits from _Microphone and implement the according default_loopback and all_loopbacks methods. A solution to prevent having too much code would be to have the theoretical _Loopback class inherit from the _Microphone class and just change the constructor to enable loopback recording (at least in case of the Windows implementation). This might complicate the code a bit, however it would result in much better consistency across all platforms (not sure if macOS supports this kind of recording). ![]() However I think that the optimal solution would be to isolate the "loopback devices" and "monitors" in a different class (much like _Microphone and _Speaker, there would be a separate class named _Loopback). ![]() ![]() Additionally I think it wouldn't make it simpler, because you would have to differentiate between platforms in the application code. I was thinking in this direction, however it would be a little counter-intuitive due to the naming being a bit backwards, because "loopback devices" are actually speakers and not microphones.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |