dgvoice icon indicating copy to clipboard operation
dgvoice copied to clipboard

PlayAudioFile never returns when not ready

Open jD91mZM2 opened this issue 7 years ago • 2 comments

When you return at https://github.com/bwmarrin/dgvoice/blob/master/dgvoice.go#L116, which means https://github.com/bwmarrin/dgvoice/blob/master/dgvoice.go#L195 waits forever, and never returns. I'd suggest closing the channel or something

jD91mZM2 avatar Apr 21 '17 09:04 jD91mZM2

Another thing, printing an error there is not the best of ideas. Because everytime PlayAudioFile closes, it throws an error because SendPCM continues to live on.

jD91mZM2 avatar Apr 21 '17 09:04 jD91mZM2

I think there's a lot of room for improvement here :)

bwmarrin avatar Apr 21 '17 13:04 bwmarrin