|
Sindel
|
 |
« on: Saturday, July 21, 2007, 14:48:17 » |
|
I've made this plugin; it's a final release, so anyone's welcome to try it out.
The idea: I was very happy to see that a %mVol% was finally added to the "Winamp media info" plugin but my joy was short-lived. I actually don't use the Winamp volume (it stays at 100% most of the time), instead, I use the System Volume (which is modified by the soundcard automatically when I turn a nob on the external console). So, basically, the plugin reads the information from the Windows Multimedia API and enables you to use this information in HyperIM. I also have an on-board soundcard, so I got to make it compatible with multiple devices.
Macros:
%sysOut% = The name of the soundcard you selected in the configuration %sysIn% = The name of the custom input line you selected in the configuration or "Master" if you chose none
%sysVolOut% = The master output volume of the soundcard %sysVolIn% = The input volume of a custom input line or equal to %sysVolOut% if no custom input is used
%sysVol% = The overall output; it is the product of %sysVolOut% and %sysVolIn% or equal to %sysVolOut% if no custom input is used
The volumes are percentages, but are not followed by the "%", for easier manipulation (you'll have to add the "%" yourself if you want). I originally inteded it to communicate with other plugins to calculate with the player's output volume to give you the real number. Haven't figured out the inter-plugin communication mechanism to do that, though...
I can only think of one drawback: If your soundcard has multiple outputs (digital, monitor), you won't get to use them. The program assumes you are using only the first output which is, in most cases (if not all) the master output. If you have such a soundcard and would really want to use that feature also, contact me and maybe we'll work something out...
I haven't encountered any bugs or memory leaks while testing; if you do, please try to describe the scenario (as in: what you did and what happened) and if I can, I'll figure it out and fix it.
Update: v1.2.3 released with a bugfix that caused a crash in HyperIM when unloading the plugin.
Enjoy!
|
|
|
« Last Edit: Sunday, March 29, 2009, 10:19:45 by Sindel »
|
Logged
|
|
|
|
Codename
HyperIM Programmer
Plugin Developer
Veteran
     
Karma: +70/-61
Posts: 928
Now you know what a hypercube means
|
 |
« Reply #1 on: Saturday, July 21, 2007, 18:27:17 » |
|
Well, the plugin works, but there is a small bug: the volume doesn't go any higher than 91, even though I'm sure all output lines are at max.
I have the usual on-board sound chip (AC97 with realtek audio driver)
Does the value get multiplicated or what?
There's no plugin yet that uses IPC, so there's not much you can do about the Winamp macro thing.
|
|
|
|
|
Logged
|
|
|
|
|
Sindel
|
 |
« Reply #2 on: Sunday, July 22, 2007, 01:59:23 » |
|
My Realtek goes all the way to 100%... Make sure there are no additional volume settings. The information is not manipulated at all; it's just as the API provides it. What can I say? Maybe it's a driver issue. Try another test; tell me which one of the volumes (input or output) doesn't cover the entire range (0-100, check for the lower bound also) and I'll include a calibration setting. Thanks for the feedback!
|
|
|
|
|
Logged
|
|
|
|
Codename
HyperIM Programmer
Plugin Developer
Veteran
     
Karma: +70/-61
Posts: 928
Now you know what a hypercube means
|
 |
« Reply #3 on: Sunday, July 22, 2007, 09:32:12 » |
|
I finally found what was causing that. Even though the master volume was at 100%, there was an small unbalanced value on the LEFT channel :O I had to go into Control Panel -> Sound and Audio -> Speakers volume to find that out. The right channel was at 100 and the left one at 91.
So it seems the reported volume is actually min (left, right). Does the plugin read the channels volumes instead of the master volume value?
|
|
|
|
|
Logged
|
|
|
|
|
Sindel
|
 |
« Reply #4 on: Sunday, July 22, 2007, 12:29:42 » |
|
Hehe, no, it actually queries for the first volume control it can get that is bound to a specific channel. Now, this just happens to be the left channel; this is new to me, I never bothered to try and see how the system handles the balance setting. I'm going to try and fix this as soon as possible Thanks for the info!
|
|
|
|
|
Logged
|
|
|
|
|
Sindel
|
 |
« Reply #5 on: Sunday, July 22, 2007, 15:14:40 » |
|
Ok, this is version 1.2 of the plugin. For the system, input and output you will have: - overall volume - L volume - R volume - balance
(all are percentages, but with the same note: you'll have to add the "%" yourself) + the device names
The volumes are intuitively read. If you have a system with more than two channels, the L and R will be the first two channels. On mono input/output lines, the overall volume will be equal to L and R volumes.
|
|
|
|
|
Logged
|
|
|
|
Znupi
Wannabee
Global Moderator
Veteran
    
Karma: +15/-9
Posts: 317
My Other OS is a Linux!
|
 |
« Reply #6 on: Sunday, July 22, 2007, 21:23:01 » |
|
there was an small unbalanced value on the LEFT channel :O I had to go into Control Panel -> Sound and Audio -> Speakers volume to find that out. WOW! Same here  , thing is, I always thought my speakers were broken because if you would turn them reaaaally low, only the right one was working, lol... I don't get one thing... %sysVol% = The overall output; it is the product of %sysVolOut% and %sysVolIn% or equal to %sysVolOut% if no custom input is used Shouldn't this be the median between %sysVolIn% and %sysVolOut%? Well it is not, I selected in the plugin "Microphone", which is at 50, and Master is 100 (I can tell because %sysVolOut% = 100 and %sysVolIn% = 50), and, with my logic, %sysVol% should be 75, right? Well it's not, it's 50  ...
|
|
|
|
|
Logged
|
|
|
|
|
Sindel
|
 |
« Reply #7 on: Sunday, July 22, 2007, 21:40:52 » |
|
Well it seems it's done you a bit of good to find that unbalance out...
And here's a crash course in audio: 75% means to a computer 0.75 (divide by 100, that's why it's called a percentage) 100% obviously means 1.00
Now, suppose your microphone level is 50% (0.5). The mixer input will multiply the audio level by this factor 0.5 before passing it on. The output is likewise. If you have a 100% on an output interface, it means that the mixer will not reduce the signal at all on that interface. The plugin uses only the first interface of the soundcard (which is, in most cases, the master output). Basically, the raw output is the raw input multiplied by the factor of all the faders. In this case it's 0.5 x 1.0 = 0.5 (50%). Another example would be: 75% input ("Wave", for example) and 33% master output. The calculation would be: 0.75 x 0.33 = 0.225 = 24.75 %; the plugin rounds it up to an integer, so it'll display 25%
|
|
|
|
|
Logged
|
|
|
|
Keloo
HyperIM Tester
Global Moderator
Veteran
    
Karma: +11/-8
Posts: 213
Expecting the Unexpected...
|
 |
« Reply #8 on: Sunday, July 22, 2007, 22:33:36 » |
|
I found a bug. Do this to reproduce it : - uncheck the plugin and close HyperIM - open HyperIM, and check (enable) the plugin - just point with the mouse cursor over the plugin's macros list (don't click on a macro) - uncheck the plugin, close HyperIM and it will crash
|
|
|
|
|
Logged
|
 Fie vreme buna/Fie vreme rea/Caini pana la moarte/Si dincolo de ea!
|
|
|
|
Sindel
|
 |
« Reply #9 on: Sunday, July 22, 2007, 23:00:26 » |
|
Nope, didn't crash; maybe I didn't do it right. But I did figure out something... I forgot the HIMK_UNREGMACROS. Wasn't in the tutorial; had to download some sample plugins to figure that one out...
So.. here's v1.2.1 of the plugin. See if it happens again; if it does, I want to know what macro list you're refering to (the CTRL+CLICK list?) Thanks for all the feedback.
P.S.: I still want the HIMK_PARSESTRING documentation; promises of great things to come (more features, calibrations); maybe even other plugins...
|
|
|
|
« Last Edit: Sunday, July 22, 2007, 23:13:35 by Sindel »
|
Logged
|
|
|
|
Znupi
Wannabee
Global Moderator
Veteran
    
Karma: +15/-9
Posts: 317
My Other OS is a Linux!
|
 |
« Reply #10 on: Sunday, July 22, 2007, 23:12:19 » |
|
I found a bug. Do this to reproduce it : - uncheck the plugin and close HyperIM - open HyperIM, and check (enable) the plugin - just point with the mouse cursor over the plugin's macros list (don't click on a macro) - uncheck the plugin, close HyperIM and it will crash
I can't reproduce it.
|
|
|
|
|
Logged
|
|
|
|
Keloo
HyperIM Tester
Global Moderator
Veteran
    
Karma: +11/-8
Posts: 213
Expecting the Unexpected...
|
 |
« Reply #11 on: Monday, July 23, 2007, 02:46:02 » |
|
I can't reproduce it.
Just follow the steps and you will reproduce it (by the way...I'm using HyperIM 2.13 Beta, but I Guess it has nothing to do with the crash) I want to know what macro list you're refering to (the CTRL+CLICK list?)
Exactly...Just move the mouse cursor over your plugin's name in that list, then close the application. For Codename: Why I can't attach files/photos? 
|
|
|
|
« Last Edit: Monday, July 23, 2007, 02:53:50 by Keloo »
|
Logged
|
 Fie vreme buna/Fie vreme rea/Caini pana la moarte/Si dincolo de ea!
|
|
|
|
Sindel
|
 |
« Reply #12 on: Monday, July 23, 2007, 05:58:16 » |
|
Nope; still clueless about this. Did you try the v1.2.1 I posted last time? Also, tried with a non-beta version of HyperIM?
|
|
|
|
|
Logged
|
|
|
|
Keloo
HyperIM Tester
Global Moderator
Veteran
    
Karma: +11/-8
Posts: 213
Expecting the Unexpected...
|
 |
« Reply #13 on: Monday, July 23, 2007, 14:51:45 » |
|
Nope; still clueless about this. Did you try the v1.2.1 I posted last time? Also, tried with a non-beta version of HyperIM?
It's the same with the new version. I will try to switch back to HIM 2.12 to see if the crash persists.
|
|
|
|
|
Logged
|
 Fie vreme buna/Fie vreme rea/Caini pana la moarte/Si dincolo de ea!
|
|
|
PANNY
Title...?
Official Beta Tester
Veteran
    
Karma: +4/-10
Posts: 153
Hard to stay alined, the course is an obstacle.
|
 |
« Reply #14 on: Monday, July 23, 2007, 15:36:42 » |
|
Can you add a refresh rate for the plugin? Like in the What I am doing plugin.
|
|
|
|
|
Logged
|
|
|
|
|