public static float IntToWaveOutVolume(uint volume) { uint left, right; HightLowConverterUInt32 u = new HightLowConverterUInt32(volume); left = u.High; right = u.Low; return((float)(((right + left) / 2) * (1.0 / 0xFFFF))); }
public static float GetVolume(IntPtr waveOut) { uint volume; MmResult result = waveOutGetVolume(waveOut, out volume); MmException.Try(result, "waveOutGetVolume"); HightLowConverterUInt32 u = new HightLowConverterUInt32(volume); uint left = u.High; uint right = u.Low; return (float)(((right + left) / 2.0) * (1.0 / 0xFFFF)); }
public static float IntToWaveOutVolume(uint volume) { uint left, right; HightLowConverterUInt32 u = new HightLowConverterUInt32(volume); left = u.High; right = u.Low; return (float)(((right + left) / 2) * (1.0 / 0xFFFF)); }