Soundswitch V1.5: Change audio settings with your remote (1 Viewer)

netexplorer

MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    Hi!

    Function:
    With this tool is it possible to switch settings of audio decoder or sound device with your remote.
    Due to that either to use an AV Receiver for AC3 decoding or to downmix the stream to stereo.
    Another option is to switch the "Default Direct Sound Device" maybe HDMI and onboard Sound.
    Working Codecs are:
    AC3Filter
    ffdshow

    Background:
    What il looked for, was a solution to use normaly my TV for sound output and sometimes use the AV Receiver with my homecinema system.
    As a workaround i developed a script to switch between Passthrough and Downmix with AC3Filter with my remote.

    System:
    My htpc is connected to TV with a DVI cable.
    Sound is connected from onboard analog output to TV.
    SPDIF is connected to AV Receiver.
    Audio renderer is AC3Filter.

    Solution:
    For audio code switching with AC3Filter for example:
    -Export the default settings for AC3Filter configured to passthrough sound to SPDIF into a *.reg file.
    -Repeat the first step with changed settings in AC3Filter configured to downmix sound into another *.reg file

    For audio device switching:
    -Export the current audio device located under "HKCU\Software\Microsoft\Multimedia\Sound Mapper" into *.reg file
    -Change the current audio device with Control Panel "Sounds and Audio" to the next sound device
    -Export again the current audio device like in step 1 into *.reg file.

    -Configure the *.ini file with your *.reg files

    -Place all files in a folder together.

    -To execute the script with your remote, create a shortcut in start menu
    -Assign a shortcut key to execute (maybe STRG + SHIFT + j).

    -Configure a button on your remote with the shortcut.
    -It's important to send the key to windows and not to Mediaportal.
    In iMon Manager create a user command with the key.

    It is possible to use more than one Soundswitch instance independent.
    -One for audio codec switching
    -One for audio device switching


    If you want ot switch codec and audio device at same time, you can combine the *.reg files together.

    Done

    Location of registry entries:
    Settings of AC3Filter in registry: HKCU/Software/AC3Filter/Preset/Default
    The Default Direct Sound Device in registry (Only Windows XP): HKCU\Software\Microsoft\Multimedia\Sound Mapper

    The script is written with AutoIT and can used for all codecs wich store settings in registry.

    Changelog:
    V1.0 Release
    V1.1 Settings stored in *.ini file. Every codec can be used.
    V1.2 Unrestricted amount of settings can be switched, message text and window size can be configured.
    V1.3 Added feature to restart Mediaportal when settings change
    V1.4 Fix issue regarding restart function
    V1.5 Adding Fix to activate Mediaportal after switching due to lost focus.
     

    Attachments

    • Soundswitch_V15.zip
      30.7 KB

    etagure

    Portal Pro
    December 14, 2007
    63
    0
    Thnx for great script
    One question.
    Before i change sound device, should I close media portal or I can change it in Media portal ?
    Thnx !
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    Sorry, but didn't test it. So please try and reply your experience here.
    Netexplorer.
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    Ok, that are bad news. Maybe i can integrate a restart of Mediaportal in the script.
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    Hi,
    i have added the feature to restart Mediaportal when the settings changed. Can be configured in *.ini file with Restart=True or False.
    Buy, Netexplorer.
     

    Soxbrother

    Portal Pro
    July 23, 2008
    115
    14
    Home Country
    Belgium Belgium
    Hello,

    Thanks for this script.

    I have a question about how it works.

    I have audio from the hdmi adapter from my ati card and
    have Realtek HD coaxial output from my Gigabyte motherboard

    What must I do to change between these 2 outputs ?

    Inside the zip-file there are 5 files
    ( Downmix.reg, Passthrough.reg, Soundswitch.au3, Soundswitch.exe, Soundswitch.ini )

    How must I edit them so I can switch between the 2 outputs ?

    Is it also possible to assign it to a remote button ?
    If yes, how is this done ?

    Sorry for the many questions.

    Can someone help me with this ?

    Thanks in advance.

    Greetings,
    Soxbrother
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    Hello Soxbrother.
    Here are the instructions for you:
    Open Control Panel section "Sounds and Audio Devices". Select your HDMI device and close dialog.
    Run regedit.exe. Go to "HKCU\Software\Microsoft\Multimedia\Sound Mapper" Export this settings into regfile maybe HDMI.reg
    Open dialog "Sounds and Audio Devices" again and select your Realtek device.
    Refresh window in regedit and export the settings in Onboard.reg
    Edit the Soundswitch.ini file with your stored regfiles. Verify, that RestartMP=True, because sound device changing needs a restart of MP.
    Create a shortcut in Windows Start menu Programs for Soundswitch.exe.
    You can test now if Soundswitch.exe toggle the audio device.
    Configure a keyboard shortcut in settings of shortcut (maybe STRG + SHIFT + j).
    In your remote control software, you can assign a button to this keyboard shortcut. It is necessary to send this shorcut to windows and not to Mediaportal.
    I hope the configuration is clear now.
    Regards, Netexplorer.
     

    Soxbrother

    Portal Pro
    July 23, 2008
    115
    14
    Home Country
    Belgium Belgium
    Hello Soxbrother.
    I hope the configuration is clear now.
    Regards, Netexplorer.

    Hello Netexplorer,

    Thank you very much
    for the detailed instructions.

    I will try it soon.

    Thanks again.

    Greetings,
    Soxbrother
     

    Soxbrother

    Portal Pro
    July 23, 2008
    115
    14
    Home Country
    Belgium Belgium
    Hello again,

    Can you you tell me how to assign the soundswitch to a button of your remote ?

    I use a mce remote :
    (http://www.bit4sale.nl/images/9222654_big.jpg)

    In MediaPortal Configuration there is a menu called "Remote" and you can choose Mappings,
    but I can't find how to assign an executable program such as "soundswitch" to a button.

    Can you please help me with this ?

    Thanks in advance,
    Soxbrother
     

    Users who are viewing this thread

    Top Bottom