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

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    @Rick164
    If you're going down the path of investigating proper handling for audio device changes, I think our current code that tracks audio device connection/disconnection could do with a bit of love. Specifically:
    • Find an alternative way to enumerate audio devices at startup that doesn't require DirectShow (ie. replace -->this<--)
    • When an audio device is removed, detect whether that device was being used as the audio renderer for the playing media. Only stop playback if the device is being used. It might be possible to detect this better with a completely different method such as with DirectShow graph events (eg. this one).
    Hi :)
    If i'm not wrong the latest code didn't handle such change @Rick164 right ? :)
    It could be nice to improve it, like this it should solve some issue like detected by @Helios61 -> HERE -< or maybe not lol.
    The @Helios61 case is when the graph is builded, the audio renderer (Default DirectSound Device) can't be added because it is no more in "FilterCollection AudioRenderers" in "Filters.AudioRenderers" because it was removed then added back triggered by DRRC.
    But it will hard to debug this when we can't reproduce it lol
     

    Rick164

    Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    Hi,

    Correct, went with the simpler approach by detecting it during playback events (before renderer) as that didn't break legacy support (WAVE devices)
    Definitely need something we can reproduce because if it's happening in renderer end we might need a bit more control in that part of the code to figure out which audio device to use :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Since we still run into issues with BCL (build bot doesn't like it), decided to go the NAudio route which was surprisingly easy to get working.
    Upsides are:

    - No BCL needed for NET40 builds (less deps)
    - Maintained and used by mayor companies
    - One .dll to include: "NAudio.dll"
    - Packed with features for later use:

    NAudio/README.md at master · naudio/NAudio · GitHub

    So a lot of extra features in library, thanks @Stéphane Lenclud for suggesting this one :)
    Will push to clean branch in a sec which will hopefully solve our build problems completely.

    // Update

    Pushed to re-created branch:

    GitHub - RickDB/MediaPortal-1 at MP1-4838-Rework_volume_control_management
    Hi @Rick164
    Testing again this branch (own fork for now) :p

    I was running into an issue on DEV PC (when using audio : Mute / Volume Up/Down) MP freeze for a while or freeze until i kill it.
    So i have added above branch into my fork and all is working good :p

    I think we should thinking to work with this (and handle what wasn't working for), what do you think ?
    Will read the thread to remember what was missing :p (Wave support or something from memory) :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Did test a lot more :) and it works pretty good, when i change from windows playback device, audio goes well to the new device / Mute and volume up/down works too :p
    And i have set Wave mode and it works too (or it fallback to master) but it rocks :p

    So maybe we can think to add it to next MP version ? :p
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Yes me too when reading back but need to test more ofc :p
    Still it's working better than before the change :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    @Rick164 @Stéphane Lenclud
    I have updated to Naudio 1.8.3 and has the quite same issue as without it on latest insider windows build.
    So i'm trying to switch to CScore and for video it seems to works no more issue but i need help to know if my change are correct, i will create a branch for you to be able to look the code if you can guys :p
    Thanks.
     

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

    OP Similar threads Forum Replies Date
    ajs MP2Web - MP1 compatibility MediaPortal 1 20
    T MadVR + LAV Filters, Perfect in MPC-BE, Bad in MP1 MediaPortal 1 Talk 12
    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 1
    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
    M.Hulot [solved] Netflix und amazon Prime in MP1 möglich? TV / Streaming 6
    Similar threads

























    Top Bottom