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

Rick164

MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Hi,

    Can't reproduce on latest commit from here, removed more old locks we had before so should not be able to lock it up :)
    Will see if we can get wave output device working but the libraries so far lack it like NAudio:

    http://stackoverflow.com/questions/20891778/controlling-a-specific-applications-volume-level

    Unless we go Windows Core Audio but that is Windows 7 and up only, CSCore might allow for it just not clear from documentation:

    https://github.com/filoe/cscore

    Bit of a mess in the Windows Audio libraries, some are either dated / requiring lots of code or missing the features we have now :p
     
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Discussed it some more with @Sebastiii and decided to make 2 solutions we can choose from, first being the rework and second being a bug fix only where we keep old code.
    So think we need to throw this in the group and see what everyone would prefer :) , from my point of view would rather not trim down on features so prefer option 2 (bugfix only)

    Branches for them:

    1. Rework where we lose wave output device support and need some workarounds for NAudio (external volume control is not ideal)

    https://github.com/RickDB/MediaPortal-1/commits/MP1-4838-Rework_volume_control_management

    2. Bugfix only + Audio renderer detection improved (no extra deps).

    https://github.com/RickDB/MediaPortal-1/commits/MP1-4838-BugfixOnly

    Bug was basically that we had a device ID history, it will now clear it if device has changed and go thru mixer re-init.
    Attached test version for bugfix only version.
     

    Attachments

    • Mediaportal_1_16_AudioBugfixOnly_001.zip
      1.6 MB
    Last edited:

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    I would definitely go for the simpler bug fix at this stage.
    @Rick164 You commits comments should start with the JIRA ID like that: "MP1-4838: My comments".
    Thus JIRA can pick them up.
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Ah didn't know that, new to Jira but will add comments in that style :)
    Can do PR if you guys want or can clone to own MP branch.
     
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    i don't understand the change between using Naudio or continu to use the actual code.

    NAudio was to fix and reduce the code (smaller implementation) at the same time however with just the bugfix works just as good but feels slightly less smooth, tried to break it a few times with external device changes / standby etc.. but can't so far :)
     

    Users who are viewing this thread

    Top Bottom