You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a result when my USB audio device replugged I cannot call speaker.Init() again, it's always stuck.
So right now I change the done channel into a buffered chan, it looks good so far, but I'm not sure whether it will cause other problem.
Is it necessary to make the done channel an unbuffered chan? How to handle the replug situation properly?
The text was updated successfully, but these errors were encountered:
I have an USB audio device which has poor contact, when replugged I have to call speaker.Init() again to make the speaker work again.
But it's stuck at here:
beep/speaker/speaker.go
Line 129 in 98afada
Since it's in a for loop, the whole loop is blocked:
beep/speaker/speaker.go
Lines 48 to 57 in 98afada
the done channel cannot be consumed, when I call speaker.Init again, it calls speaker.Close first, then it's stuck at here:
beep/speaker/speaker.go
Line 69 in 98afada
As a result when my USB audio device replugged I cannot call speaker.Init() again, it's always stuck.
So right now I change the done channel into a buffered chan, it looks good so far, but I'm not sure whether it will cause other problem.
Is it necessary to make the done channel an unbuffered chan? How to handle the replug situation properly?
The text was updated successfully, but these errors were encountered: