Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 12th February 2003, 10:01   #1
mr_biscuit
Junior Member
 
Join Date: Feb 2003
Posts: 2
Send a message via ICQ to mr_biscuit Send a message via AIM to mr_biscuit Send a message via Yahoo to mr_biscuit
Get Winamp Volume

Unfortunately there is no api that will return the current volume of winamp. I have managed to find a way (it is messy) but it does return the volume.

What you have to do is extract the volume from the winamp ini file. The only problem is that this value is not current - it is the volume that was set when the user last exited winamp (and therefore triggered the ini file to be written).

What I have done is to refresh the volume when winamp is idle (i.e. not playing!) by restarting winamp and hence updating the ini file. I can then extract the volume which is now as up2date as possible.

I told you this is messy but its the only way I can find to retrieve the volume. If anyone knows of a way to update the ini file in any other way other than restarting winamp, please let me know!

Mr Biscuit
mr_biscuit is offline   Reply With Quote
Old 12th February 2003, 16:35   #2
princeofdrkness
Junior Member
 
Join Date: Feb 2003
Posts: 7
are you sure about that?

I was just looking at a component that allows you to control winamp...called mp3remote and it has no problem reading/setting the volume so there must be a way to do it.

The control iz here:

http://www.mindblastsoftware.com/ind...page=mp3remote

It does not seem to work with winamp 3 though so you'll have to use the earlier versions.
princeofdrkness is offline   Reply With Quote
Old 12th February 2003, 16:39   #3
princeofdrkness
Junior Member
 
Join Date: Feb 2003
Posts: 7
OOOOPSssss sorry that control does not tell u volume level

I'm sorry I made a mistake the above component does not tell u the volume level it just let's u adjust the volume. Sorry for the mistake.
princeofdrkness is offline   Reply With Quote
Old 17th February 2003, 22:28   #4
jmoschetti45
Senior Member
 
jmoschetti45's Avatar
 
Join Date: Oct 2002
Location: Marquette, MI
Posts: 101
Send a message via AIM to jmoschetti45 Send a message via Yahoo to jmoschetti45
You can get the current volume from winamp.
I can do it in VB. I just have to find my code sheet so hold on.
jmoschetti45 is offline   Reply With Quote
Old 17th February 2003, 22:31   #5
jmoschetti45
Senior Member
 
jmoschetti45's Avatar
 
Join Date: Oct 2002
Location: Marquette, MI
Posts: 101
Send a message via AIM to jmoschetti45 Send a message via Yahoo to jmoschetti45
Sub WinAMP_GetVolume(VolumeValue As Long)
If hwndWinamp = 0 Then
MsgBox "WinAMP window not found yet...", vbOKOnly + vbCritical, "WinAMP Not Found"
Exit Sub
End If
If VolumeValue < 0 Or VolumeValue > 255 Then
Exit Sub
End If
SendMessage hwndWinamp, WM_USER, VolumeValue, WA_GETVOLUME
End Sub
jmoschetti45 is offline   Reply With Quote
Old 18th February 2003, 11:24   #6
marianosc
Junior Member
 
Join Date: Mar 2002
Posts: 18
jmoschetti45, that is for Winamp 2 ... how can you get the volume in Winamp3?
marianosc is offline   Reply With Quote
Old 18th February 2003, 23:43   #7
jmoschetti45
Senior Member
 
jmoschetti45's Avatar
 
Join Date: Oct 2002
Location: Marquette, MI
Posts: 101
Send a message via AIM to jmoschetti45 Send a message via Yahoo to jmoschetti45
sorry but with that I can't help you much because all I can do in 3.x is play, pause, ect. Nothing complex yet.
jmoschetti45 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump