[MP1-4838] Volume control no longer functions properly when changing audio device (1 Viewer)

Rick164

Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    Added small tweaks for some of NAudio's shortcomings but is finally ready for review and testing in 1.17 :)
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    Btw for 1.17 we can also remove the "Hide Windows Volume OSD" setting as that is no longer needed, kept it in but it really does nothing now as like before with AudioSwitcher the new library (NAudio) will not trigger that OSD.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,434
    10,256
    France
    France France
    Country flag
    I have pushed the branch in MP1 repo along with NSIS and postbuild change :p
    Yep we could remove that option is not neede anymore (hide volume) :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,434
    10,256
    France
    France France
    Country flag
    Here for quick testing part before going back to work :p

    1- OSD is not working/displayed when no playback is running (so staying on GUI from MyVideo for ex)
    2- OSD didn't react when i change the Volume directly from windows speaker icon.
    3- OSD with + and - when something is played (sample AVI)

    This is a quick test so maybe i need to setup some option :p

    Edit : after an MP restart volume OSD works (+ and - and mute) but i can see only the mute OSD (on or off) if i just use - or + otherwise the volume mute off or on but no OSD displayed lol.

    upload_2017-1-11_13-39-31.png
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    1- OSD is not working/displayed when no playback is running (so staying on GUI from MyVideo for ex)
    That's odd, it should pick the default device on startup and return it when not playing, will test here in VM :)

    2- OSD didn't react when i change the Volume directly from windows speaker icon.
    Yeah that's normal behavior atm, Mediaportal is leading and used as dedicated volume control (overrules external)
    AudioSwitcher had some options for that and NAudio as well with event based changes (albiet a bit more obscure), could add that with some extra code but needs checks so we don't set volume double then :):

    That change basically:
    http://stackoverflow.com/a/31972775

    If volume change is from device used in Mediaportal it will trigger the Mediaportal OSD that way.

    Edit : after an MP restart volume OSD works (+ and - and mute) but i can see only the mute OSD (on or off) if i just use - or + otherwise the volume mute off or on but no OSD displayed lol.
    Could be device related but tested that part with Realtek and HDMI sources, does it show any volume change in windows sys tray?

    // Update

    Added external volume monitoring as well which will listen on the device Mediaportal started with or when it switches during playback events:

    https://github.com/RickDB/MediaPortal-1/commit/f25e95407585b841c2b4450927c2e75365e29252
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,434
    10,256
    France
    France France
    Country flag
    I was thinking before when moving volume MP react to it but maybe i'm wrong :p
    But if you can add this, it would be nice ofc :)

    Could be device related but tested that part with Realtek and HDMI sources, does it show any volume change in windows sys tray?

    // Update

    Added external volume monitoring as well which will listens on the device Mediaportal started with or when it switches during playback events:

    https://github.com/RickDB/MediaPortal-1/commit/f25e95407585b841c2b4450927c2e75365e29252
    Yes it react :) only OSD is not updated until i press + or - but i will retry when at home :p
    And thanks for adding it.

    Did you rebase your local branch against MP1 repo (if yes or no) can you add the commit about NSIS into yours ?
    Thanks again.
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    Not re-based yet but only mixer.cs changes so should be clean merge :)
    Testing some things now and seeing a possible lock from the objects it had from the old code, will see if that is causing it.

    // Update

    Object lock seems to be obsolete now so removed that and pushed:

    https://github.com/RickDB/MediaPortal-1/commit/a71855cf69a112e4081aa916ea75377fc11bb18c

    For + and - not working it might be a device mismatch, once you're home we can test further on IRC with some added debug logging.
    During startup it will report the device used for volume control (default device):

    Code:
    [2017-01-11 15:31:57,737] [Log    ] [MPMain   ] [INFO ] - Mixer: default audio device: DENON-AVRHD-0 (NVIDIA High Definition Audio
    )

    I was thinking before when moving volume MP react to it but maybe i'm wrong :p
    Yeah not sure, never really used the volume handling of Mediaportal (all bitstreamed) but my brother does so will force him to be a tester :p

    Also just fixed a typo for mute (forgot to use value) :sleep: , for the brave few who want to test out latest build attached it.
     

    Attachments

    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,434
    10,256
    France
    France France
    Country flag
    That's better :)
    Only one issue is mute button i need to mute twice to have it muted or correctly displayed as muted on OSD :p

    Otherwise windows slider react correctly with OSD one on MP etc. :p
    Nice nice :)
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    Yeah double mute should be fixed in latest commit, in rare cases can happen if you press it rapidly but might be NAudio issue (not sure yet) :)
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,366
    4,994
    France - IDF
    France France
    Country flag
    Hey, i have merged the branch, but yesterday morning,
    I have mp freeze when move windows audio slider. I have see an commit where can solve mp hang on this. I will update my setup

    Envoyé de mon P01MA en utilisant Tapatalk
     

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

    OP Similar threads Forum Replies Date
    C Hauppauge HVR-1265 -- does it work with MP1? MediaPortal 1 Talk 1
    ajs MP2Web - MP1 compatibility MediaPortal 1 20
    T MadVR + LAV Filters, Perfect in MPC-BE, Bad in MP1 MediaPortal 1 Talk 13
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    S TV-Server MP1 - Automatic search doesn't work Installation, configuration support 2
    C Streaming/transcoding MP2 vs MP1? General 4
    ajs [fixed] 5015: Improving the MP1 installer, providing nicer GUI :) MediaPortal 1 138
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    S Shortcuts MP1 My Recorded & TV Guide General 10
    azzuro [WiP] MP1-4999 - Big changes with many related change at once by Sebastiii MediaPortal 1 12
    ajs [Help Us!] MP1 X64 Version MediaPortal 1 20
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    wizard123 [solved] MP1 Build help MediaPortal 1 21
    ajs [News] MediaPortal 1 - 1.24 Released! News and Announcements 3
    CyberSimian [fixed] MP1-4990 : Improve horizontal scrolling in the EPG MediaPortal 1 10
    azzuro [WiP] MP1-5019: Replace MySQL with MariaDB MediaPortal 1 40
    catalpa Umsteiger von MP1: Schwierigkeiten Allgemeines Support- und Diskussionsforum 17
    CyberSimian [solved] MP1-4976 Built-in skin variables for current date MediaPortal 1 8
    rbo [solved] Umsteiger MP1 zu MP2 Allgemeines Support- und Diskussionsforum 67
    azzuro [Info] MP2 TVE inside MP1 repo MediaPortal 2 12
    G MP1 TV Server "failed to upgrade the database" using MS Sql Server Installation, configuration support 3
    lisag Can I get MP1 to open in the Recorded TV screen? MediaPortal 1 Talk 2
    M MP1 stops responding after Starting Plugins General Support 14
    R Problem with MP1 and WifiRemote Skins and Plugins Installer (MPEI) 8
    Similar threads

























    Top Bottom