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
We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020
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
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.
1. I opened the project with Visual Studio
2. Find API version code in foolower.cpp and change it to 20:
3. Find the plugin header includes in foolower.hpp and replace them with the correct path to the pluginsdk:Code:int ts3plugin_apiVersion() { return 20; }
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.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"
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".
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.
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
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 ä?Code:C:\Users\Xxxxxxx Xäxxxxx\AppData\Roaming\TS3Client
Crosstalk and other plugins can save their configuration files...
Help is appreciated!![]()
this shouldn't be a problem.
does the file exist? if not, can you create an empty "foolower.ini" yourself in the folder?
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)
Doesn't work, because I think it can't find the config directory.Code:bRecognizeSelf = 1 iVolumeMute = 90 iVolumeResume = 120
EDIT: I think the problem is at line 53 of foolower.cpp, he tries
instead of something like thisCode:char *pszPath = new char[256];
Code:char *pszPath = std::vector<char>
Last edited by Nekres; June 26th, 2014 at 06:32 PM.
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
For TS3 this won't work, but the idea behind it should.Code:ifstream settings; wstring path = OBSGetPluginDataPath().Array(); settings.open(path + L"\\filename");
Maybe someone can help me out with this?
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):
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.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; ...
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:
edit: I have the feeling that this thread more and more drifts off to a C++ programming course...Code:[general] myself=1 [volumes] mute=90 resume=120
Last edited by Goreki; June 27th, 2014 at 08:33 PM.
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.
There is an idea smooth restoration of volume foobar
For example, for 500 ms to restore the volume from 90 to 120, optional
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:
The ini file can be located at C:\Users\*username*\AppData\Roaming\TS3Client\fool ower.iniCode:[general] myself=1 delay=5000 [volumes] mute=120 resume=255
If this file doesn't exist, you can create it.
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
or just make it future compatible by returning the teamspeak API version itself. (return getTeamspeakAPIversion(); //pseudo!)Code:int ts3plugin_apiVersion() { return 20; // this needs to be 21 }
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)