Operating System Hide Windows volume OSD (1 Viewer)

Marcus Venturi

Super User
  • Team MediaPortal
  • Super User
  • March 23, 2012
    614
    745
    52
    Germany Germany
    Country flag
    There is something wrong with the audio code itself.

    In VolumeHandler.cs the CreateInstance() medhod has the following statement:

    if (GUIGraphicsContext.DeviceAudioConnected > 0)
    {
    ...
    }

    The if-case is not entered, because GUIGraphicsContext.DeviceAudioConnected is 0 at that time.

    It is initialized later (at least on my PC).

    Therefore always the VolumeHandlerCustom is created, which is wrong, because I have selected the Vista/Win7 volume handler.

    In the base constructor of VolumeHandler there is the same comparision that prevents the

    VolumeOSD.HideOSD();

    from being called. If I jump there manually, the Volume OSD is hidden on my PC.

    @Sebastiii : Can you reproduce this behavior? Does this happen only on my PC?

    Looks like the Scale setting in the configuration is irrelevant, always the custom volume handler is taken.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Hi Marcus,

    I will try to reproduce it. We work on this change with @mm1352000 (more him about the idea to change the code :) )
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Argh, the code seems to be very messy. I don't like code like this. :(

    @Sebastiii
    Why do we have the "if (GUIGraphicsContext.DeviceAudioConnected > 0)" checks?
    Is it to avoid initialising/using the "_mixer" object, or...?

    Why is the code sometimes checking whether the volume is 19660500 instead of checking DeviceAudioConnected?
    https://github.com/MediaPortal/Medi...l/Core/DShowNET/Helper/DirectShowUtil.cs#L945

    In general it seems like the Mixer and MasterVolumeHandler classes were designed to handle the situation when no audio end-point is available, so I don't understand why the "wrapping checks" - "if (...)" - are needed.

    <sigh>
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    That's why i try to put review in Jira lol but not so much dev look into it :p :) (i know that it's not easy) and my coding style is not really nice :)
    About the 19660500, it's a workaround and i remember needed it but i can't remember why exactly. But if you can help us on this, it could be really nice.
    Thanks in advance.
     

    Marcus Venturi

    Super User
  • Team MediaPortal
  • Super User
  • March 23, 2012
    614
    745
    52
    Germany Germany
    Country flag
    OK, I debugged the code and found the reason for the error.

    If fails, because at the the begin of MediaPortal.OnStartup() the ProcessPlugins are loaded and started.

    In my case the start code of the UPnP renderer plugin has an access to the VolumeHandler to get the current volume.
    Therefore an instance of the VolumeHandler is created long before the audio devices are registered in the OnStartup().

    This leads to an incorrect initialization of the VolumeHandler as DeviceAudioConnected is zero at that time..

    A quick solution could be to load the plugins after init of the audio devices.

    @mm1352000 , @Sebastiii : What do you think?
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    I think it could be ok but i'm not sure, i'm just trying to debug it and DeviceAudioConnected was '24' on my side, so i didn't trigger the value of '0' but i didn't test a lot too lol
     

    Marcus Venturi

    Super User
  • Team MediaPortal
  • Super User
  • March 23, 2012
    614
    745
    52
    Germany Germany
    Country flag
    Just install the UPnP renderer plugin, then you should be able to reproduce the problem...[DOUBLEPOST=1452706493][/DOUBLEPOST]To be able to go on I disabled the UPnP renderer for the moment.

    @regeszter : I have built the code from your branch and the volume OSD is hidden. For me your code works on Windows 10 Pro. Can you explain me in detail what goes wrong?
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    So just need to move those 2 lines later in OnStartup()

    C#:
        PluginManager.LoadProcessPlugins();
        PluginManager.StartProcessPlugins();
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    R [solved] Hide Windows 10 volume OSD Feature Requests 3
    vvulture Using Windows 10 MediaPortal 1 Talk 8
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    Dark Eyes Updated to Windows 10, now TVServer won't work Installation, configuration support 1
    rsbrux Operating System Win 10 vs. 8.1 Operating System 2
    M.Hulot Moving Pictures lässt sich nach Windows-Update nicht mehr öffnen Plugins & Erweiterungen 1
    O Analog Angel USB TV Tuner on Windows 7 Ultimate Newcomers Forum 7
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    R Problem with MP1 and WifiRemote Skins and Plugins Installer (MPEI) 8
    R Directx 9.0 June 2010 does not install on Windows 10 x64, ends up with weird failure / no debug file Installation, configuration support 0
    W windows 7 and mediaportal 1.22 and 1.23 installer problem General Support 2
    D [solved] Active Movie window General 2
    TLD Windows 10 1903 feature update General Support 3
    A Problem Windows 10 64 bit prof. Update auf Version 1903(gelöst) Installationsprobleme? 0
    T No TV after updating Windows 10 to latest Version 1903 / OS build 18362.175 (logs attached) General Support 2
    T Can Emprex 3009ARF III MCE Remote Control be used to toggle Fullscreen/Windowed mode?? Remotes 7
    P WMC on Windows 7 migrating to Media Portal on Windows 10 Newcomers Forum 5
    F [solved] Mediaportal (1 oder 2) Installation mit Fehler bei DirectX9.0 unter Windows 10 Allgemeines Support- und Diskussionsforum 10
    HTPCSourcer [Rejected] Mouse movements and focus: Windows standards MediaPortal 2 3
    D [solved] HID remote for mp2 and w10 64 bit? using all tools: sony, cisco, homeworkx ng General 2
    Lehmden MP2 client for Windows 10 ARM, possible? Maybe an UWP version could do the trick... MediaPortal 2 11
    Rob Hexenmeister [solved] Latests Media Handler - Skinning an updating window or control Fanart Handler 26
    el Filou Is Windows Media Player still needed on Windows 10 ? MediaPortal 1 Talk 0
    A Enigma2 receiver channels on Windows PC with Media Portal help General Support 0
    W Playback stuttering after upgrade from MP1 on Windows 7 to MP2 on Windows 10 General 2
    Similar threads

























    Top Bottom