mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Win7AudioPlugin updated to version 1.6
- New bangs Mute/Unmute - Volume shows -1 when muted
This commit is contained in:
parent
10f0640298
commit
31b51da234
@ -28,8 +28,8 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,3,0,513
|
FILEVERSION 1,3,0,515
|
||||||
PRODUCTVERSION 1,3,0,513
|
PRODUCTVERSION 1,3,0,515
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -45,12 +45,12 @@ BEGIN
|
|||||||
BLOCK "040b04b0"
|
BLOCK "040b04b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "Rainmeter - A Customizable Resource Meter"
|
VALUE "FileDescription", "Rainmeter - A Customizable Resource Meter"
|
||||||
VALUE "FileVersion", "1, 3, 0, 513"
|
VALUE "FileVersion", "1, 3, 0, 515"
|
||||||
VALUE "InternalName", "Rainmeter"
|
VALUE "InternalName", "Rainmeter"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2010 - Rainy"
|
VALUE "LegalCopyright", "Copyright (C) 2010 - Rainy"
|
||||||
VALUE "OriginalFilename", "Rainmeter.exe"
|
VALUE "OriginalFilename", "Rainmeter.exe"
|
||||||
VALUE "ProductName", "Rainmeter"
|
VALUE "ProductName", "Rainmeter"
|
||||||
VALUE "ProductVersion", "1, 3, 0, 513"
|
VALUE "ProductVersion", "1, 3, 0, 515"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -41,8 +41,8 @@ extern "C"
|
|||||||
{
|
{
|
||||||
__declspec( dllexport ) UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id);
|
__declspec( dllexport ) UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id);
|
||||||
__declspec( dllexport ) void Finalize(HMODULE instance, UINT id);
|
__declspec( dllexport ) void Finalize(HMODULE instance, UINT id);
|
||||||
__declspec( dllexport ) UINT Update(UINT id);
|
//__declspec( dllexport ) UINT Update(UINT id);
|
||||||
//__declspec( dllexport ) double Update2(UINT id);
|
__declspec( dllexport ) double Update2(UINT id);
|
||||||
__declspec( dllexport ) LPCTSTR GetString(UINT id, UINT flags);
|
__declspec( dllexport ) LPCTSTR GetString(UINT id, UINT flags);
|
||||||
__declspec( dllexport ) UINT GetPluginVersion();
|
__declspec( dllexport ) UINT GetPluginVersion();
|
||||||
__declspec( dllexport ) LPCTSTR GetPluginAuthor();
|
__declspec( dllexport ) LPCTSTR GetPluginAuthor();
|
||||||
@ -328,21 +328,23 @@ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
|
|||||||
This function is called when new value should be measured.
|
This function is called when new value should be measured.
|
||||||
The function returns the new value.
|
The function returns the new value.
|
||||||
*/
|
*/
|
||||||
UINT Update(UINT id)
|
//UINT Update(UINT id)
|
||||||
{
|
//{
|
||||||
GetWin7AudioState(GET_VOLUME);
|
// GetWin7AudioState(GET_VOLUME);
|
||||||
UINT volume = is_mute == TRUE ? 0 : static_cast<UINT>(master_volume * 100.0f + 0.5f); // rounding up at 0.5
|
// UINT volume = is_mute == TRUE ? 0 : static_cast<UINT>(master_volume * 100.0f + 0.5f); // rounding up at 0.5
|
||||||
return volume > 100 ? 100 : volume;
|
// return volume > 100 ? 100 : volume;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This function is called when new value should be measured.
|
This function is called when new value should be measured.
|
||||||
The function returns the new value.
|
The function returns the new value.
|
||||||
*/
|
*/
|
||||||
//double Update2(UINT id)
|
double Update2(UINT id)
|
||||||
//{
|
{
|
||||||
// return 0;
|
GetWin7AudioState(GET_VOLUME);
|
||||||
//}
|
double volume = is_mute == TRUE ? -1.0 : floor(master_volume * 100.0 + 0.5); // rounding up at 0.5
|
||||||
|
return volume > 100.0 ? 100.0 : volume;
|
||||||
|
}
|
||||||
|
|
||||||
LPCTSTR GetString(UINT id, UINT flags)
|
LPCTSTR GetString(UINT id, UINT flags)
|
||||||
{
|
{
|
||||||
@ -413,7 +415,7 @@ void Finalize(HMODULE instance, UINT id)
|
|||||||
|
|
||||||
UINT GetPluginVersion()
|
UINT GetPluginVersion()
|
||||||
{
|
{
|
||||||
return 1005;
|
return 1006;
|
||||||
}
|
}
|
||||||
|
|
||||||
LPCTSTR GetPluginAuthor()
|
LPCTSTR GetPluginAuthor()
|
||||||
@ -507,6 +509,26 @@ void ExecuteBang(LPCTSTR args, UINT id)
|
|||||||
{
|
{
|
||||||
if (!GetWin7AudioState(TOGGLE_MUTE)) LSLog(LOG_DEBUG, L"Rainmeter", L"Win7AudioPlugin: Mute Toggle Error!");
|
if (!GetWin7AudioState(TOGGLE_MUTE)) LSLog(LOG_DEBUG, L"Rainmeter", L"Win7AudioPlugin: Mute Toggle Error!");
|
||||||
}
|
}
|
||||||
|
else if (_wcsicmp(wholeBang.c_str(), L"Mute") == 0)
|
||||||
|
{
|
||||||
|
if (!is_mute)
|
||||||
|
{
|
||||||
|
if (!GetWin7AudioState(TOGGLE_MUTE))
|
||||||
|
{
|
||||||
|
LSLog(LOG_DEBUG, L"Rainmeter", L"Win7AudioPlugin: Mute Error!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (_wcsicmp(wholeBang.c_str(), L"Unmute") == 0)
|
||||||
|
{
|
||||||
|
if (is_mute)
|
||||||
|
{
|
||||||
|
if (!GetWin7AudioState(TOGGLE_MUTE))
|
||||||
|
{
|
||||||
|
LSLog(LOG_DEBUG, L"Rainmeter", L"Win7AudioPlugin: Unmute Error!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LSLog(LOG_DEBUG, L"Rainmeter", L"Win7AudioPlugin: Unknown bang!");
|
LSLog(LOG_DEBUG, L"Rainmeter", L"Win7AudioPlugin: Unknown bang!");
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
const int revision_number = 513;
|
const int revision_number = 515;
|
||||||
const bool revision_beta = true;
|
const bool revision_beta = true;
|
Loading…
Reference in New Issue
Block a user