audio: support audio hot-plug event for Windows
authorByeongki Shin <bk0121.shin@samsung.com>
Tue, 23 Feb 2016 06:27:04 +0000 (15:27 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 8 Mar 2016 08:07:52 +0000 (17:07 +0900)
commit3956394944c566db1101d278ab5a65d55fdec880
treedeab347fe8429cd1a22a7aceeff2ec398e9db314
parent2e85b60622c9efb59f7f755a99c8a17afe637fc0
audio: support audio hot-plug event for Windows

Because dsound audio doesn't support audio endpoint event,
it has failed to initialize without speaker or mic connection.
Now, dsound supports audio endpoint event.
Therefore, emulator can play sound
even if a speaker is connected to host lately.

- Because the COM initialization requires for each thread,
  in order to share the object, a thread is used as init and event handler.
- When event occurs, the notification callback sends it to init thread.
  If we handle the event in notification callback, it would make deadlock.

Change-Id: Iaeef62d6c5b0952f77f0040abea9bfc7778be536
Signed-off-by: Byeongki Shin <bk0121.shin@samsung.com>
audio/audio.c
audio/dsound_template.h
audio/dsoundaudio.c