Closed ik5 closed 4 years ago
@moutend following additional testings:
Waiting for testing it on different hardware to know for sure.
If it works, when I think that from todo
you can set it as an example in the code.
Cheers :)
@ik5 Thank you for suggestions. The go-wca project is not developed actively for now, but I'll implement the IMMNotificationClient in future version.
Although I'm learning Windows internals in deep because lacks of my knowledge, I can't say when the future version will be released. :cry:
@ik5, would you mind expanding on how you managed to use the existing go-wca
code to receive "default device changed" notifications in your own code?
I've been trying to do this in my project and can't figure out how to do it without the IMMNotificationClient
interface's full implementation.
Thank you!
edit: I've just looked in the TODO
file you mentioned and now it's clear! :)
Hi everyone. I released go-wca
v0.2.0, it supports IMMNotificationClient. Check the _example/DeviceEvents
.
@moutend awesome to hear, thank you very much! I'm using your wonderful library in my project.
I was wondering if you would also add similar support for IAudioSessionNotification
.
As a side note, the struct seems to have a pointer to IAudioSessionEventsVtbl
instead of the IAudioSessionNotificationVtbl
declared below it. Once I changed it locally and did something similar to what you did here, I did manage to receive OnSessionCreated
callbacks with it :)
@omriharel Enjoy!
Anyway, I'm also planning that support such features. I'll implement that in this week or next week.
@moutend I haven't tested it yet, but if it works, it will be on many machines in the following months ;-)
from some testing, the code itself seems to work on some events:
I changed the code a bit, waiting 10 minutes using
time.After
withselect
.I think that maybe the issue that the sound card does not detect the changes, but still investigating that idea.