public override int GetSignalStrength() { if (tuner != null) { int strength; tuner.get_SignalStrength(out strength); return(strength); } return(-1); }
private void TestSignalStrength() { int hr = 0; int strength; hr = tuner.get_SignalStrength(out strength); DsError.ThrowExceptionForHR(hr); // If the tunerequest is correct, strength should be greater then zero... Debug.Assert(strength > 0, "ITuner.get_SignalStrength"); }
/// <summary> /// Get the signal strength for the currently tuned channel /// </summary> protected override int GetSignalStrength() { if (tuner != null) { int strength; int hr = tuner.get_SignalStrength(out strength); DsError.ThrowExceptionForHR(hr); if (strength == 0) { return(0); } //translate the values to get "acceptable" signal strengths only strength = (-1 * strength) + 4000; if (strength == 0) { strength += 1; } return(strength); } return(-1); }