magic-FE / translate-man

An excellent google translation plug-in, you will love it
MIT License
276 stars 41 forks source link

Too many system sound streams created while this extension is enabled #71

Closed k3a closed 5 years ago

k3a commented 5 years ago

After installing you extension, I noticed Firefox started creating many audio streams in Pulseaudio (system sound server on Linux) which weren't producing any sound. After about 40 of them, Pulseaudio started having problems mixing the streams.

The problem seem to be the creation of the new AudioContext here https://github.com/magic-FE/translate-man/blob/66e47140b71b4f405c485e51f18ec3b262c8a2ca/src/store/index.js#L56 that is created for every loaded page, even for pages in an iframe!

Can you refactor it somehow so that AudioContext is created just before the extension needs to play sound and the context has not been created already?!

cloudfroster commented 5 years ago

The problem has been fixed in next version. thx for your feedback.