Yuubari / KanColleViewer

Binaries are here:
https://github.com/Yuubari/KanColleViewer/releases
MIT License
61 stars 20 forks source link

Alarm ding when notifications pop up #1

Closed Kintok1 closed 8 years ago

Kintok1 commented 8 years ago

This was already in 3.X.X versions, but has been lost for 4.X.X ones.

Would it be possible to bring that back? Or maybe add a custom alarm feature?

Yuubari commented 8 years ago

It's not in the original KCV so it has to be re-implemented.

Moreover, the original implementation has some very bad design decisions related to “different sounds for different types of notifications” and I'm unsure whether these can be rectified.

Yuubari commented 8 years ago

Update on this: will probably be ready soon as an additional plug-in. It will only implement sound notifications, with “visible” tray/toast stuff provided by the original plug-in.

Kintok1 commented 8 years ago

Good to know, looking forward to it.

Yuubari commented 8 years ago

It's basically ready but there's one issue: I don't remember whether the notification sound in 3.x ever overrode KCV's “mute audio” function.

I've implemented audio output part of the new plug-in with the exact same library and the exact same code, but it gets muted when KCV is muted. Is it the same on 3.x?

Yuubari commented 8 years ago

Feel free to test it out: AudibleNotifications 1.0. You have to configure it via Settings, Plugins, AudibleNotifications Settings (the small link in the Features line).

Note that as mentioned above, if you mute KCV using the mute button custom sounds will not play, however the default Windows ding will (when no custom sounds are found).

Kintok1 commented 8 years ago

Haven't tested the custom ones, but the Windows ding works correctly like it used to, thanks!

As a note, the notifications in 3.x releases did play the Windows ding even if the game was muted by KCV's mute button.

Yuubari commented 8 years ago

Because it's the way life's meant to be.

The ding is generated in the system notifications audio session which is system-wide and independent from application audio sessions like KCV's. Sadly, there is no way to access this audio session to play arbitrary audio streams aside from using a very old API call (PlaySound) that only supports 16-bit PCM RIFF WAVE files and has some issues, too.

This plug-in will be included with KCV, starting with next build.