TooTallNate / node-speaker

Output PCM audio data to the speakers
655 stars 147 forks source link

feat: async flush and close #182

Open MengLi619 opened 3 weeks ago

MengLi619 commented 3 weeks ago

Make flush and close asynchronously, otherwise flush or close will block the main thread. But only Windows (win32) and MacOS (coreaudio) are tested, other backends are not tested (Don't have enough time and resource to test every backend, sorry). So this should be a BREAK_CHANGE, I just want to submit a PR for now and ask someone's advice.