Audio Switcher - easily change audio device via context menu (using remote key) | Page 2

Discussion in 'MediaPortal 1 Plugins' started by Rick164, April 24, 2016.

  1. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Eventghost message plugin has its own HID config section I believe, in its own plugin configuration you have to override the button you want to map (same as in one of the steps):

    [​IMG]


     
    Last edited: December 30, 2016
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Virtual

    Virtual Portal Member

    Joined:
    January 6, 2017
    Messages:
    22
    Likes Received:
    6
    Gender:
    Male
    Ratings:
    +8 / 0
    Home Country:
    Italy Italy
    Hi.

    I have installed MP v1.16 on a new PC with W10 x64 and I found your great plugin so I tried it.
    It works well except one thing ... when I switch audio to another device, I lost the volume functionality ... the volume OSD appears but it doesn't work anymore (the same occurs to the GUI sound but I can use MP without it ... but the volume control is important for me).
    If I switch back to the original audio device (the default device when I loaded MP), the GUI sound and the volume return to work correctly.

    Can you help me? I miss something in the config or the plugin doesn't re-initialize GUI sound / volume control?

    I tried to config the volume as wave or master volume but it make no difference.

    Thanks in advance.
    Andrea
     
  4. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Hi,

    Volume control not showing up is a weird one, in code we only switch the device externally (via AudioSwitcher library) and change nothing in Mediaportal itself.
    It might be a bug in Mediaportal which doesn't allow for live switching for the OSD hook, if you post logs will take a look :)

    @Sebastiii any ideas on how we hook the OSD right now and if that can affect if the users does switch to a new primary audio device?
     
    Last edited: January 6, 2017
    • Like Like x 1
  5. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,207
    Likes Received:
    6,173
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,158 / 9
    Home Country:
    France France
    Show System Specs
    Hi :)

    MP count audio device up and down but the init is done on MP start so it can be related to this if i'm not wrong, we maybe change MP code to handle such (not sure how too lol).
     
    • Like Like x 3
  6. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Thanks, added these lines to code right after changing of device for testing:

    Code (Text):
    1.    
    2. VolumeHandler.Dispose();
    3. VolumeHandler.CreateInstance();
    4.  
    But that doesn't seem to help, best guess would be audio devices connected doesn't update on its own:

    https://github.com/MediaPortal/Medi...cfc8/mediaportal/Core/Player/VolumeHandler.cs

    // Update

    Remains working here with public release even when switching back and forth audio devices, makes me think it's that hide volume OSD toggle we have in settings.

    @Virtual

    Could you re-test with the following settings:

    osd.PNG

    osd_2.PNG
     
    Last edited: January 6, 2017
    • Like Like x 1
    • Thank You! Thank You! x 1
  7. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Can replicate the problem with volume OSD, the moment we call the used library in a particular way the OSD stops working however only as a plugin.
    When I do the same externally via their app it keeps working, need to test is some more and will push new version hopefully today.

    @Virtual

    Attached early test build, it will delay loading AudioSwitcher's initial startup by 15s to no conflict with Mediaportal as that looks like the cause.
    What worked without issues here:

    - Switch from HDMI -> Headset
    - Switch from Realtek analog -> HDMI

    Will make the startup delay configure-able but if you could confirm this fixes it (with previously posted settings) will push new release out afterwards.
     

    Attached Files:

    Last edited: January 6, 2017
    • Thank You! Thank You! x 1
  8. Virtual

    Virtual Portal Member

    Joined:
    January 6, 2017
    Messages:
    22
    Likes Received:
    6
    Gender:
    Male
    Ratings:
    +8 / 0
    Home Country:
    Italy Italy
    Hi.

    This is my settings for the test:

    1 - start playing a video
    2 - change the audio device
    3 - change the volume (the OSD appares on the screen but the volume don't change)

    External test from the log ... if I change the audio device, the MP volume remains attached to the original device because if I press up / down from the remote I can see the volume (on the windows 10 playback device window) that follow the MP volume.

    Now I will try your attached file
     

    Attached Files:

    • Untitled.png
      Untitled.png
      File size:
      40.1 KB
      Uploaded:
      January 6, 2017
      Views:
      67
    • Untitled2.png
      Untitled2.png
      File size:
      36.4 KB
      Uploaded:
      January 6, 2017
      Views:
      62
    • Like Like x 2
  9. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Looks like we need to set log level a bit higher as I'm seeing no AudioSwitcher entries.
    Btw does the problem only occur if you switch while a video is playing?

    As I just tested while playing as well (hdmi <--> analog set) and kept working :)

    log_level.PNG
     
    Last edited: January 6, 2017
  10. Virtual

    Virtual Portal Member

    Joined:
    January 6, 2017
    Messages:
    22
    Likes Received:
    6
    Gender:
    Male
    Ratings:
    +8 / 0
    Home Country:
    Italy Italy
    Hi
    With the new release the volume control doesn't work anymore ... I can ear the GUI sound when I press up / down but the volume level doesn't change (and the OSD don't show up on the screen).
    This happen in the GUI or when I watch a movie ...
    I can change the audio device but the volume doesn't work.

    PS. I attach the only mediaportal.log ... previously I used the watchdog functionality to create the log files.
     
  11. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    That's odd, can't see any errors which makes me wonder what is the cause.
    The volume handler is spawning so that works, since we don't touch that from plugin it must be something else then.

    Could you try with different skin perhaps in case it's something specific to that (tested with StreamedMP here), also would need log level set to debug as otherwise we get no AudioSwitcher log entries :)
     
Loading...

Users Viewing Thread (Users: 0, Guests: 1)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!