Linux AnnouncementManager OnVolumeChange issue
#1
Question 
Hello,

I have an addon which can control volume of a piece of hardware through USB. For that I had to block volume changes within XBMC.
I use the onVolumeChanged notification to trigger volumecontrol. From that point things do not really work as it should for my situation.
Main issue is that there is not 1 notification but a whole lot of... This is causing XBMC only is busy processing the notifications for seconds, making it imp;ossible to do something else in the meantime. Controlling the volume for instance.


Part of xbmc.log:
17:16:11 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:11 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:11 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:11 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:11 T:139796359722816 DEBUG: ------ Window Init (DialogVolumeBar.xml) ------
17:16:12 T:139796078724864 DEBUG: middleware: SendCommand. command sent = "v57"
17:16:12 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:12 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:12 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:12 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:13 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:13 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:13 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:13 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:14 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:14 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:14 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:14 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:14 T:139796359722816 DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0
17:16:14 T:139796359722816 DEBUG: OnKey: volume_down (0xf0b8) pressed, action is VolumeDown
17:16:14 T:139796359722816 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
17:16:14 T:139796359722816 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
17:16:15 T:139796078724864 DEBUG: middleware: SendCommand. command sent = "v52"
17:16:15 T:139796078724864 DEBUG: middleware: SendCommand. command sent = "v47"


This way a volume change costs 5 seconds or more. Pretty unacceptable ofcourse.

Is there a way to get less announcements? Or just 1 in case volume changes? Now it seems there is an announcement every 100 millisecond.
Or is there a totally different approach I should use? Maybe a separate service in the addon only controling the external volume after a notification?

I'm pretty stuck in this for weeks now...
All help is welcome! :-)

Best regards,

Scores
Reply

Logout Mark Read Team Forum Stats Members Help
AnnouncementManager OnVolumeChange issue0