Audio Switcher - easily change audio device via context menu (using remote key) (1 Viewer)

Rick164

Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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):

     
    Last edited:

    Virtual

    Portal Member
    January 6, 2017
    22
    12
    42
    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
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    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).
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    Thanks, added these lines to code right after changing of device for testing:

    Code:
    VolumeHandler.Dispose();
    VolumeHandler.CreateInstance();
    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:

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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.
     

    Attachments

    Last edited:

    Virtual

    Portal Member
    January 6, 2017
    22
    12
    42
    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
     

    Attachments

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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:

    Virtual

    Portal Member
    January 6, 2017
    22
    12
    42
    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.
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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 :)
     

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

    OP Similar threads Forum Replies Date
    Golf4 TV-Records werden als Audio-Files importiert ? Allgemeines Support- und Diskussionsforum 0
    W [solved] Incorrect audio being reported Moving Pictures 4
    404 [solved] Live TV...video and audio freeze General Support 20
    ninja 12 Audio dropouts with Dolby / DTS watch/edit Videos 12
    bta489 [solved] DVB-T2 Recordings: Sometimes no Audio after muxing with mkvmerge Tools and other software 2
    T [solved] MP2 Switch off visualisation when listening to audio....PLEASE!!! General 23
    azzuro [fixed] [WIP MP2.3] - Audio files not imported to MP MediaPortal 2 18
    S Remote button to change audio and subtitle on / off General 10
    F Audio render and font error in my logs General Support 2
    R [solved] Command / Shortcut for changing subtitles or audio Archive 5
    K Multichannel audio and subtitles for TV not properly supported General Support 4
    Glith Audio out of sync after pause. Rewind 15sec gets it into sync again. MediaPortal 1 Talk 0
    C ARC Audio Renderer Changer: wo kann man es konfigurieren? Video & DVD 15
    joecrow No Audio after MP Start/Resume from Sleep General Support 0
    C Ability to browse videos and audio by folder General 2
    Lichloathe Offline audio content General 9
    G How best to get cover art for tracks to show up on the Audio Menu (Latest Added, Unplayed)? General 9
    Ralph Holmes Wrong audio source in TV General 1
    CyberSimian [Proposal] Audio description MediaPortal 1 10
    ge2301 [fixed] [MP2-807] Problem when switching player in PiP mode with audio files MediaPortal 2 32
    cladinshadows85 [solved] Audio playing mutiple times over video and crashing General 8
    H Live TV info OSD not displaying number of audio channels General Support 3
    T Moving Pictures...seem to have 'lost' ability to display Movie info. (eg Resolution/Audio) Moving Pictures 2
    N [fixed] [MP2-786] Cannot play audio playlist with >=1000 entries 2.2 Archive 36
    B Media info shows audio is 5.1 MP shows 2.0 Watch / Listen Media 2
    Similar threads

























    Top Bottom