Closed RuABraun closed 3 years ago
It seems to be related to the blocksize
? If I set it smaller than the signal that part of the signal gets played.
Trying to see if I can manually drain the buffer.
I've also got multiprocessing going on, #96 relevant
edit: So I got it to work by importing soundcard inside the class/method.
Sometimes player.play()
does not return immediately, instead taking as long as the sound to be played, why could this be?
I was doing too much work on the audio thread, and some processing I was doing was making it sound like there was a pause.
And my question about play()
not returning immediately was answered very nicely here: https://bastibe.de/2017-06-27-audio-apis-pulseaudio.html
Hi! I want to use soundcard to play sounds continuously, but without using the
with speaker.player(...) as ...
construct as the player/stream is meant to be part of a class.I was hoping I could just call
__enter__()
to simulate being inside awith
block, but playing sounds does not really work for some reason. Example codeThe weird thing is if I add second
player.play(a)
call I get a sound, but that stops working if I shorten the length of the signal.So I'm guessing there's some extra setup that needs to be done to play sounds, but I cannot figure out what it is?