It is currently March 29th, 2024, 3:53 pm

AudioLevel

Share and get help with Plugins and Addons
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: New Plugin: AudioLevel

Post by dgrace »

killall-q wrote:BUG: Playing audio or video locally and then closing the player while playing will cause the sound to be "stuck" in a horrible buzzing fashion.

I can replicate this with both 1.0.2 and 1.0.5 (don't have 1.0.0), with VLC and MPlayer. Windows Media Player doesn't glitch out as much, I suspect due to WMP stopping playback properly when exiting. I've tried all the output methods in VLC with the same results (DirectX, WaveOut, Windows Multimedia Device). The buzz can be fixed by playing any audio and stopping properly. This only manifests while the plugin is loaded.

My audio output device is Realtek HD Audio.

One question: does the buzzing stop when you unload/refresh the skin in Rainmeter?

dave
User avatar
killall-q
Posts: 305
Joined: August 14th, 2009, 8:04 am

Re: New Plugin: AudioLevel

Post by killall-q »

dgrace wrote:One question: does the buzzing stop when you unload/refresh the skin in Rainmeter?
It does. If the buzzing glitch fixes itself for unknown reasons I can bring it back by reloading the skin. I'm on Win 7 x64.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: New Plugin: AudioLevel

Post by dgrace »

Ok one more. This one fixes the bug jsmorley and I have been seeing, where the levels don't get zeroed out when an application closes. Probably doesn't fix the stuck looping though - I still can't see any way that I can detect that from the plugin. I even get a little of it when switching tracks in Windows Media Player. Doesn't make sense that I should have to stop monitoring at the end of any audio source though, because then it would shut off if you got an email alert in the middle of a song.

This one also lets you specify the ID of your preferred device, so you can create multiple different ones for headphones, speakers etc. To get the ID, create a child measure with Type=DeviceList and look in the RainMeter About window - copy out the ID part (before the : )
and put that in your parent AudioLevel measure. Example:

ID={0.0.0.00000000}.{46d58e44-3203-462d-8150-1c032fc53301}

It'll then open that device rather than the default.

Sorry I don't have more good news about the looping audio bug - this one really seems like it's on Windows end.

dave
User avatar
Dank420
Posts: 145
Joined: April 3rd, 2013, 1:04 am
Location: O-High-O

Re: New Plugin: AudioLevel

Post by Dank420 »

First thank you for working on this :thumbup:
second thank you for working on this :thumbup: :thumbup:
third thank you for working on this :thumbup: :thumbup: :thumbup:

trying to force refresh to stop buzzing

;[measurerefresh]
;measure=calc
;formula=[measureAudioRaw_Out]
;ifequalvalue=0
;ifequalaction=[!refresh]
;dynamicvariables=1

above bad idea as continual refresh sort of locks things up.... better ideas anyone?
You do not have the required permissions to view the files attached to this post.
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: New Plugin: AudioLevel

Post by dgrace »

Did some searching on MSDN forums, looks like it's a known Windows bug, there's a workaround I'll try hooking up tonight.

dave
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: New Plugin: AudioLevel

Post by dgrace »

Ok try this latest one, see if the looping buffer is still happening on shutdown. Also added gain params to the RMS and peak levels to make up for the filtering loss.

dave
User avatar
killall-q
Posts: 305
Joined: August 14th, 2009, 8:04 am

Re: New Plugin: AudioLevel

Post by killall-q »

It does fix it, but not without "breaking it in" by playing audio from specific sources first, for example YouTube or Windows Media Player. It even stayed fixed when I reinstalled 1.0.6. Once it's fixed, it's fixed until the next log on or restart. And while it's quickly fixed for VLC this way, it's much more random and rare to get the fix to work for Audacity.

Output peaks changed in 1.0.7 for both peak and RMS to ~0.8468. After some mysterious conditions are met, output peaks change to ~0.9847.

Only 550 Hz tones produce a flat output for seeing this:
Audacity Test Tones.zip
No file format preserves amplitude, so it's an Audacity project file. Uncheck "solo" to switch to the other track. Use with this graph skin:

Code: Select all

[Rainmeter]
Update=25

; ----------------MEASURES--------------

[mPeak]
Measure=Plugin
Plugin=AudioLevel
Type=Peak
PeakAttack=0
PeakDecay=0
RMSAttack=0
RMSDecay=0

[mPeakL]
Measure=Plugin
Plugin=AudioLevel
Parent=mPeak
Type=Peak
Channel=L

[mPeakR]
Measure=Plugin
Plugin=AudioLevel
Parent=mPeak
Type=Peak
Channel=R

[mRMS]
Measure=Plugin
Plugin=AudioLevel
Parent=mPeak
Type=RMS

[mRMSL]
Measure=Plugin
Plugin=AudioLevel
Parent=mPeak
Type=RMS
Channel=L

[mRMSR]
Measure=Plugin
Plugin=AudioLevel
Parent=mPeak
Type=RMS
Channel=R

; ----------------STYLES----------------

[sText]
X=r
Y=R
FontFace=Consolas
FontColor=FFFFFF
NumOfDecimals=5
AntiAlias=1

; ----------------METERS----------------

[Graph]
Meter=Line
W=600
H=200
LineCount=6
MeasureName=mPeak
MeasureName2=mPeakL
MeasureName3=mPeakR
MeasureName4=mRMS
MeasureName5=mRMSL
MeasureName6=mRMSR
LineColor=FF0000
LineColor2=FF9900
LineColor3=FF6666
LineColor4=00FF00
LineColor5=00FFFF
LineColor6=CCFF99
SolidColor=00000044
AntiAlias=1

[Peak]
Meter=String
MeasureName=mPeak
MeterStyle=sText
X=-255R
Y=8
Prefix="Peak  : "

[PeakL]
Meter=String
MeasureName=mPeakL
MeterStyle=sText
Prefix="Peak L: "

[PeakR]
Meter=String
MeasureName=mPeakR
MeterStyle=sText
Prefix="Peak R: "

[RMS]
Meter=String
MeasureName=mRMS
MeterStyle=sText
X=20R
Y=8
Prefix="RMS  : "

[RMSL]
Meter=String
MeasureName=mRMSL
MeterStyle=sText
Prefix="RMS L: "

[RMSR]
Meter=String
MeasureName=mRMSR
MeterStyle=sText
Prefix="RMS R: "
You do not have the required permissions to view the files attached to this post.
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: New Plugin: AudioLevel

Post by drakulaboy »

This my friend is AWESOME!!! I'm so happy like a baby xD, made it a little equalizer on rush with this plugin, looks nice!
:YESSS:

[youtube]Rj0U2PQejzk[/youtube]

[youtube]zkfdgeDIVqI[/youtube]

i bet we can do coolest equalizers, lights, animated speakers with this plugin, thank you again!
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: New Plugin: AudioLevel

Post by Seahorse »

Splendid, I may have to revise several skins once I have had a play a looked at Update rates... 8-)
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: New Plugin: AudioLevel

Post by drakulaboy »

*Solved
Thank you killall-q
Last edited by drakulaboy on July 21st, 2014, 8:46 am, edited 3 times in total.