Forum

Page 6 of 7 FirstFirst ... 4567 LastLast
Results 76 to 90 of 92
  1. #76
    Join Date
    November 2013
    Posts
    57
    I don't have foobar, so I cant test it.
    but I compiled it successful and it loads fine for me, so see yourself whether it works or not
    Attached Files Attached Files

  2. #77
    Join Date
    June 2014
    Posts
    11
    Thank you, master.

    It works fine!!!


    Sadly, not as I expected, I have my foobar volume at -10db and when someone speaks it adjust the volume to -8db by default and then back to 0db. (So it is actualy only working how it should when one has foobar at 0db, meaning 100% volume.) Is there a way you could implement a toolbar, like a slider, where one can change that default value?

    (If anything, could you explain me how you did compile and update it? I will find my way through the code myself then.)

    EDIT: Just noticed youa re the guy from the volume controller recreation plugin
    (http://forum.teamspeak.com/showthrea...only%29-remake)
    Thank you for that, but I do not like the fact that it is lowering everything, I just need my music to be lowered. Great plugin, though!
    Last edited by Nekres; June 25th, 2014 at 08:03 PM.

  3. #78
    Join Date
    November 2013
    Posts
    57
    1. I opened the project with Visual Studio
    2. Find API version code in foolower.cpp and change it to 20:
    Code:
    int ts3plugin_apiVersion()
    {
    	return 20;
    }
    3. Find the plugin header includes in foolower.hpp and replace them with the correct path to the pluginsdk:
    Code:
    #include "yourpath ... \pluginsdk\include\public_errors.h"
    #include "yourpath ... \pluginsdk\include\public_definitions.h"
    #include "yourpath ... \pluginsdk\include\public_rare_definitions.h"
    #include "yourpath ... \pluginsdk\include\ts3_functions.h"
    There was also a file "public_events.h" included, but this one doesn't exist in the current pluginsdk, so I assumed it was from an older version and just deleted that line.

    4. Compile with the platform/configuration selected you need - I did both x86 and x64. Goto the project folder and in the subfolder "public" you will find the dll files.


    Looking at the code it seems, that there are some commands which you can use to configure the plugin ("/foolower help") and there is also a plugin for foobar2000, which is needed if you want to use "/foolower volumes".

  4. #79
    Join Date
    June 2014
    Posts
    11
    Yes, already have foo_winamp_spam

    Thanks to the foolower commands, I don't even need to recompile it.
    And wow, didn't now updating could be so easy!!
    I always thought of a header like a real big chunk of code from an SDK.

    THANKS MASTER OF GREATER KNOWLEDGE.

  5. #80
    Join Date
    June 2014
    Posts
    11
    Sadly, it doesn't find my config path (ts3Functions.getConfigPath was used though) it doesn't save the foolower.ini and I have to adjust it everytime I restart ts3.
    I am using Windows 7 and my config folder is located
    Code:
    C:\Users\Xxxxxxx Xxxxxx\AppData\Roaming\TS3Client
    The X represent my name. I left out one letter, because my theory is that maybe the path can't be found because it is an ?
    Crosstalk and other plugins can save their configuration files...

    Help is appreciated!

  6. #81
    Join Date
    November 2013
    Posts
    57
    this shouldn't be a problem.

    does the file exist? if not, can you create an empty "foolower.ini" yourself in the folder?

  7. #82
    Join Date
    June 2014
    Posts
    11
    Yeah, I think I should be able to, but I know the definitions from the foolower.cpp and can create the content of the ini file myself. But I mdidn't try, because I believe when it doesn't write it, I don't think it can read it either.

    Ok I tried it with following content (definitions taken from foolower.cpp):

    foolower.ini in TS3Client directory (ts3Functions.getConfigPath)
    Code:
    bRecognizeSelf = 1
    iVolumeMute = 90
    iVolumeResume = 120
    Doesn't work, because I think it can't find the config directory.

    EDIT: I think the problem is at line 53 of foolower.cpp, he tries
    Code:
    	char *pszPath = new char[256];
    instead of something like this
    Code:
    	char *pszPath = std::vector<char>
    Last edited by Nekres; June 26th, 2014 at 06:32 PM.

  8. #83
    Join Date
    June 2014
    Posts
    11
    I think deleting that handling of path finding and replacing it nwith only "ts3Functions.getConfigPath" would be a good Idea, I had the exact same problem with a Open Broadcaster Plugin and he fixed it with
    Code:
    ifstream settings;
    wstring path = OBSGetPluginDataPath().Array();
    settings.open(path + L"\\filename");
    For TS3 this won't work, but the idea behind it should.

    Maybe someone can help me out with this?

  9. #84
    Join Date
    November 2013
    Posts
    57
    The thing is that "ts3Functions.getConfigPath" writes the string in a char array, but the WinAPI functions to get or write data from/in ini-files expects a LPCWSTR, which stands for "Long Pointer to Constant Wide String". So one character has to be two bytes long, instead of only one byte, which you get by "ts3Functions.getConfigPath".

    So the conversion is needed and there are multiple ways to do it.
    This is C++...there are pretty much always ten billions of ways to do something and you find half of them on google, which will often destroy your head, because you think "but but...I just want a simple way pleeeease".

    Of course you can also do the reading and writing of parameters yourself and don't use the WinAPI functions at all to avoid the conversion...

    For example I do it this way in my plugin (I also use an ini-file and the WinAPI functions):
    Code:
    WCHAR iniFileNameBuffer[MAX_PATH];
    
    // get ini path
    char configPath[MAX_PATH];
    ts3Functions.getConfigPath(configPath, MAX_PATH);
    swprintf(iniFileNameBuffer, MAX_PATH, L"%S%S",configPath, "volumecontrol_plugin.ini");
        
    // load settings from from ini
    SETTINGS_low_volume = float(GetPrivateProfileInt(L"parameters", L"rate", 5, iniFileNameBuffer))/100;
    ...
    I have to include "<stdio.h>" to use swprintf. It's one of those printf functions, which I love to use for this formating/concatenating/whatever work with strings. Perhaps it's not the fastest or efficient way, but I dont care...this code runs only once at plugin initialization anyway.

    Aside from that, the original code works just fine for me, so I dont know why you really want to change it or think that the problem lies there.

    For the manual created foolower.ini...you have to put it in the configPath, where all the other config files also are, not just into the TS3Client folder.
    The content is also wrong. Here the right format:
    Code:
    [general]
    myself=1
    [volumes]
    mute=90
    resume=120
    edit: I have the feeling that this thread more and more drifts off to a C++ programming course...
    Last edited by Goreki; June 27th, 2014 at 08:33 PM.

  10. #85
    Join Date
    June 2014
    Posts
    11
    Yeah I had only the content wrong, I knew that it has to be put in appdata ts3 config folder and I created it there.

    Hmm, still same error as in the OBS plugin (which got fixed by the author as I said it.), still it won't read the ini file.

  11. #86
    Join Date
    August 2015
    Posts
    3
    Quote Originally Posted by Goreki View Post
    mute=90
    resume=120
    There is an idea smooth restoration of volume foobar.
    For example, for 500 ms to restore the volume from 90 to 120, optional

  12. #87
    Join Date
    August 2015
    Posts
    3
    There is an idea smooth restoration of volume foobar
    For example, for 500 ms to restore the volume from 90 to 120, optional

  13. #88
    Join Date
    August 2015
    Posts
    3
    It would be nice to add a smooth restoration of volume from 90 to 120

  14. #89
    Join Date
    March 2016
    Posts
    1
    Quote Originally Posted by HectorPrima View Post
    It would be nice to add a smooth restoration of volume from 90 to 120
    I have (messily) updated the plugin to smoothly restore the volume over its delay period (default 1500 ms). Atm the smooth restoration is hardcoded. Source code included - check the 'Build' folder for your compiled plugins. You can change the delay in the foolower.ini file - Example:

    Code:
    [general]
    myself=1
    delay=5000
    [volumes]
    mute=120
    resume=255
    The ini file can be located at C:\Users\*username*\AppData\Roaming\TS3Client\fool ower.ini
    If this file doesn't exist, you can create it.
    Attached Files Attached Files

  15. #90
    Join Date
    June 2014
    Posts
    11

    Question

    I know this is somewhat graveyarded, but I am using this since forever. However, since the recent myTeamspeak patch (api v21) it is not working anymore.

    I need this, because I like just my music to be lowered when someone speaks, not sounds from other applications such as games.

    Could somebody that has the knowhow rebuild the file with the correct header at line

    foolower.cpp
    Code:
    int ts3plugin_apiVersion()
    {
    	return 20;    // this needs to be 21
    }
    or just make it future compatible by returning the teamspeak API version itself. (return getTeamspeakAPIversion(); //pseudo!)

    Please?

    edit: Nvm, I checked the Volume Control plugin again and it has gotten a whitelist for programs to be surpressed. I will use that from now on.
    Last edited by Nekres; January 12th, 2017 at 03:26 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Release] Volume Control (Windows 7+ only) remake
    By Goreki in forum Client Plugins / Lua Scripts
    Replies: 128
    Last Post: August 28th, 2019, 02:40 PM
  2. [Release]Channel Control Module
    By willy_sunny in forum Client Plugins / Lua Scripts
    Replies: 56
    Last Post: December 31st, 2016, 10:00 AM
  3. Volume control and volume reduction
    By Someguy in forum Client Support
    Replies: 3
    Last Post: September 3rd, 2013, 10:28 PM
  4. [Solved] [REQUEST] Foobar2000 Volume control.
    By jo0man in forum Client Plugins / Lua Scripts
    Replies: 8
    Last Post: January 16th, 2010, 03:22 AM

Posting Permissions

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