Summary:
Heap is corrupted due to an implementation of the "device" option and process is subsequently crushes.
Steps to reproduce:
Use Speaker on Windows.
Affected version:
0.4.1
Workaround:
Use speaker@0.4.0.
Additional info:
device is conditionally set on the binding.cc:34 and freed on the binding.cc:107. There are 2 issues with this implementation:
device might not be provided from user and not allocated in the Open method, but Close method will try to deallocate it nevertheless, which would lead to a heap corruption.
open method on audio_output (binding.cc:44) does not respected the provided device and will always replace it with a statically allocated "WaveMapper" string (win32.c:61). This makes "device" property effectively useless on Windows.
Summary: Heap is corrupted due to an implementation of the "device" option and process is subsequently crushes.
Steps to reproduce: Use Speaker on Windows.
Affected version: 0.4.1
Workaround: Use speaker@0.4.0.
Additional info: device is conditionally set on the binding.cc:34 and freed on the binding.cc:107. There are 2 issues with this implementation: