mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Use getter instead of property to grab volume levels
This commit is contained in:
parent
907fed2f1d
commit
c3fcfbfddf
@ -25,6 +25,16 @@ namespace DS4Windows.DS4Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint getVolume()
|
||||||
|
{
|
||||||
|
float pfLevel = 0;
|
||||||
|
|
||||||
|
if (endpointVolume != null)
|
||||||
|
endpointVolume.GetMasterVolumeLevelScalar(out pfLevel);
|
||||||
|
|
||||||
|
return Convert.ToUInt32(pfLevel * 100);
|
||||||
|
}
|
||||||
|
|
||||||
public DS4Audio(DataFlow audioFlags = DataFlow.Render)
|
public DS4Audio(DataFlow audioFlags = DataFlow.Render)
|
||||||
{
|
{
|
||||||
var audioEnumerator = new MMDeviceEnumeratorComObject() as IMMDeviceEnumerator;
|
var audioEnumerator = new MMDeviceEnumeratorComObject() as IMMDeviceEnumerator;
|
||||||
|
@ -803,8 +803,8 @@ namespace DS4Windows
|
|||||||
outputReportBuffer[8] = LightBarColor.blue; //blue
|
outputReportBuffer[8] = LightBarColor.blue; //blue
|
||||||
outputReportBuffer[9] = ledFlashOn; //flash on duration
|
outputReportBuffer[9] = ledFlashOn; //flash on duration
|
||||||
outputReportBuffer[10] = ledFlashOff; //flash off duration
|
outputReportBuffer[10] = ledFlashOff; //flash off duration
|
||||||
outputReportBuffer[19] = outputReportBuffer[20] = Convert.ToByte(audio.Volume);
|
outputReportBuffer[19] = outputReportBuffer[20] = Convert.ToByte(audio.getVolume());
|
||||||
outputReportBuffer[21] = Convert.ToByte(micAudio.Volume);
|
outputReportBuffer[21] = Convert.ToByte(micAudio.getVolume());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool quitOutputThread = false;
|
bool quitOutputThread = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user