Patch: Change Music AudioDevice inside MP, but xmlwriter saves changes only sometimes (1 Viewer)

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Hello everybody,

    I've created a small patch for the MP configuration section to change the Music Audiodevice inside MP.
    But my Problem is that the MP xmlwriter only sometimes saves the changes :( Has anybody an idea what's the problem? I can't find it...

    2011-08-07 16:29:30.734624 [Info.][MPMain(1)]: CONFIG: SelectedLabel: 0
    2011-08-07 16:29:30.735624 [Info.][MPMain(1)]: CONFIG: Device: Default Sound Device
    2011-08-07 16:29:57.104132 [Info.][MPMain(1)]: CONFIG: SelectedLabel: 2
    2011-08-07 16:29:57.104132 [Info.][MPMain(1)]: CONFIG: Device: Realtek Digital Output (Realtek High Definition Audio)

    this is my log output, but nothing changed in the mediaportal.xml (I checked it after every change)

    Note:
    the Skinfile is for dedaultWide skin, the patch is based on latest SVN 28114

    Edit:
    it looks like MP saves the changes only after closing MP...
     

    Attachments

    • SettingsMyMusic.xml
      4 KB
    • ConfigMusic_v1.patch
      3.9 KB

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    AW: Patch: Change Music AudioDevice inside MP, but xmlwriter saves changes only somet

    If somebody is interested in the solution:
    It seems like MP saves the changes to the mediaportal.xml only if it gets shutdown, but if you use getValue MP gives you the right value, so I guess that MP saves the changes temporary somewhere and just saves all changes to the xml file when it gets shutdown ;)
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    If somebody is interested in the solution:
    It seems like MP saves the changes to the mediaportal.xml only if it gets shutdown, but if you use getValue MP gives you the right value, so I guess that MP saves the changes temporary somewhere and just saves all changes to the xml file when it gets shutdown ;)

    Yes sorry I meant to reply. Mediaportal.xml gets cached so some settings are not written to the file straight away. Can't remember when it gets flushed but certainly it does when MP closes
     

    sky-jumping

    New Member
    December 25, 2008
    3
    0
    Home Country
    United States of America United States of America
    Hi to all,

    has this issue been resolved by now? I believe that I am facing the same problem:
    When changing the default sound device with AutoHotKey in Videos (or Moving Pictures) the default audio device changes without any problem to the new one (as long as I stop and restart the movie) and audio is going to the new device. If I try the same thing in Music then the default audio device is changed to the new one I selected (as far as windows is concerned) but the audio is still going to the old audio device.

    I was told that a bug report had been issued about 2 years ago and that a fix was going to come in new releases (but it has not yet).

    Thanks for your help :)
     

    Users who are viewing this thread

    Top Bottom