Results 1 to 7 of 7

Thread: Plugin to handle BYVAR for audio sources

  1. #1
    Low Bitrate rtgree01's Avatar
    Join Date
    Aug 2007
    Location
    STL
    Posts
    99

    Plugin to handle BYVAR for audio sources

    I'm calling this plugin RRSkAug.... for SkinAugmentor.

    Have you ever come across a time where you want to have a label that shows the radio frequency when listening to the radio, but the XM/Sirius channel name when listening to satellite? It works fine... Now what about when you use the Web Radio plugin? RR numbers the input sources... but with the new audio plugins aren't consistent between users.... BYVAR works, but it can get ugly...

    I wrote this plugin to help with that. It uses an xml file to configure what you want to display for each source.

    Here is the readme:
    RRSkAug

    A Skin Augmentor plugin for RideRunner.

    Thanks to Mitch for the idea of this plugin.


    This plugin is meant to help skinners when it comes to handling different active sources. At one point in time, active sources were enumerated from 0 to X. Then extra sources were added that would get appended to the end of the list. But it won't be the enumeration won't be the same on different setups. Skinners used to be able to use BYVAR to change what happens or what shows up on a skin. Until this plugin, a skinner would have to check each individual guid using a IFVAR command. This plugin will do the lookup based on the ACTIVESOURCEGUID. All configuration is done with XML config files.

    There is a default Sources.xml file that is installed in the plugin configuration directory. It should be in RRProfileDirectory\Plugins\RRSkAug\
    The skinner should modify this Sources.xml file to customize the skin.

    The source element has several parameters:

    Guid : The GUID of the active source in RR.
    Name : A friendly name of this source. Currently unused.
    Cycle : A boolean of whether or not to use this source when cycling through a list of sources. See RRSKAUG_SRC_CYCLE_NEXT
    RRCommand : The RRCommand that should be used to switch to this source. See RRSKAUG_SRC_CYCLE_NEXT

    Each Source can have an array of commands, labels, and indicators that can be customized specifically for this source.

    The Command element has two parameters:

    RRSkAugVar : The command lookup code that should be put in the skin file.
    command : The command that will be executed if this source is active.

    The Indicator element has several options

    RRSkAugVar : The indicator lookup code that should be in the skin file.
    image : The absolute path to the image file to be used if this source is active.

    or

    RRSkAugVar : The indicator lookup code that should be in the skin file.
    indicator : The Ride Runner indicator to base the image off of.
    image_on : The absolute path to the image file to be used if the indicator is in the on state and this source is active.
    image_off : The absolute path to the image file to be used if the indicator is in the off state and this source is active.


    The Label element has 2 parameters:

    RRSkAugVar : The label lookup code that should be in the skin file.
    label : The Ride Runner label to use if this source is active.



    RRSKAUG_SRC_CYCLE_NEXT

    This plugin will cycle through a list sources when the RRSKAUG_SRC_CYCLE_NEXT command is executed. The list is assigned by specifying Cycle="true" for each source that is to by cycled through. Only those sources will be used when switching to the next source. The order that the sources are entered into the Sources.xml file determines the cycle order.
    I hope you find this useful... If you have problems with it, let me know. I'll fix things as soon as I can....

    There is no guarantee this will work... Who knows... it could cause your car to catch fire, fall into an abyss, crash your car, or maybe just crash your system. I'm not to blame if you can't look up off your screen to drive.

    Disclaimer aside, good luck!
    Attached Files Attached Files
    Last edited by rtgree01; 02-01-2013 at 09:57 AM. Reason: Updated the installer file

  2. #2
    The Last Good Gremlin GizmoQ's Avatar
    Join Date
    Nov 2004
    Location
    St Louis
    Posts
    2,347
    Quote Originally Posted by rtgree01 View Post
    I'm calling this plugin RRSkAug.... for SkinAugmentor.

    Have you ever come across a time where you want to have a label that shows the radio frequency when listening to the radio, but the XM/Sirius channel name when listening to satellite? It works fine... Now what about when you use the Web Radio plugin? RR numbers the input sources... but with the new audio plugins aren't consistent between users.... BYVAR works, but it can get ugly...
    Byvar is cumbersome, but does work:
    From a 2012 thread on ACTIVESOURCEID

    I've been doing this since 2008 in my skins, any button that activates an audiosource also sets a global variable named CurrentSource to a number I use for that source and copies the old number to a global variable named LastAudio. Then byvars do all the work. Unlike ACTIVESOURCEID, the order is whatever I want and there is no limit to the number of audio sources I can add/use.
    HARDWARE: Fujitsu Stylistic ST5111w/WiFi and dock, internal Hitachi 500G HD, external 1TB HD, Sierra Wireless Aircard 550, DVD-RW, BoomzBox HD radio, XM Commander, Delorme GPS, Saitek X-52 Pro joystick, BluSoleil Bluetooth, TPMS, FB, Elm327

  3. #3
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,841
    I have an issue with your installer that install the dll allways into a 'RideRunner' folder, but my install use a 'Ride Runner' folder.
    Can you check your installer ?
    If i try to install manually the dll into a RRSkAud folder the dll isn't registered ! (I use Vista)

  4. #4
    Low Bitrate rtgree01's Avatar
    Join Date
    Aug 2007
    Location
    STL
    Posts
    99
    I bet you aren't using "Profile Mode"..... I'll try to add an option to install to a directory of your choice... I'm new to creating installers, so we'll see what happens

    Ryan

  5. #5
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,841
    Quote Originally Posted by rtgree01 View Post
    I bet you aren't using "Profile Mode"..... I'll try to add an option to install to a directory of your choice... I'm new to creating installers, so we'll see what happens

    Ryan
    The best method is that the installer found the good path into the register !
    mitchjs given me an install script !

    see:
    //////////////////////////////////////////////////////////////
    // Get DATA Path, based on Profile Mode
    //////////////////////////////////////////////////////////////
    function DataPath(p: String): String;
    begin
    // look for rr.ini?
    if FileExists(ExpandConstant('{userdocs}\RideRunner\C onfig\rr.ini')) then
    begin
    if DirExists(ExpandConstant('{userdocs}\RideRunner')) then
    Result := ExpandConstant('{userdocs}\RideRunner')
    else
    Result := ExpandConstant('{reg:HKLM\Software\RideRunner,Path |{pf}\RideRunner}')
    end
    else
    Result := ExpandConstant('{reg:HKLM\Software\RideRunner,Path |{pf}\RideRunner}')
    end;
    Attached Files Attached Files

  6. #6
    Low Bitrate rtgree01's Avatar
    Join Date
    Aug 2007
    Location
    STL
    Posts
    99
    I've looked into this a bit more.... also read your original post again....

    I attempted to use the example inno installer script you sent. Thank you! I asked mitch a while back to send me something, but he must have forgotten.

    One problem that I have is that I don't have regsvr32.exe in my {dotnet20} directory. When I tried to just use regsvr32.exe, it fails to register. What does seem to work is {dotnet20}\regasm.exe /codebase /tlb

    I hope this helps.... I updated the original post to include a new installer file.

    Ryan

  7. #7
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,841
    regsvr32.exe used for register a vb6 dll and regasm.exe for register a VB.NET dll .

Similar Threads

  1. Replies: 5
    Last Post: 08-21-2013, 06:12 AM
  2. Replies: 1
    Last Post: 07-14-2008, 02:45 PM
  3. inputing multiple audio sources via 5.1
    By customstevo in forum Car Audio
    Replies: 1
    Last Post: 11-28-2006, 12:01 AM
  4. How do I use the Base plugin sources ?
    By guino in forum RR FAQ
    Replies: 1
    Last Post: 04-24-2006, 03:43 PM
  5. 5.1 Audio Sources -- Available from IDE??
    By sq_geek in forum Car Audio
    Replies: 0
    Last Post: 03-28-2005, 11:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •