/// <summary> /// Return the current stream volumes for all channels /// </summary> /// <returns>An array of volume levels between 0.0 and 1.0 for each channel in the audio stream.</returns> public float[] GetAllVolumes() { Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.GetChannelCount(out var channels)); var levels = new float[channels]; Marshal.ThrowExceptionForHR(audioStreamVolumeInterface.GetAllVolumes(channels, levels)); return(levels); }
public float[] GetAllVolumes() { uint count = ChannelCount; float[] levels = new float[count]; int hr = _RealVolume.GetAllVolumes(count, levels); Marshal.ThrowExceptionForHR(hr); return(levels); }