From: coderhyme Date: Mon, 6 Mar 2017 00:51:34 +0000 (+0900) Subject: Fix AudioEffect error. X-Git-Tag: submit/trunk/20170823.075128~94^2~111^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a28cad61ddfbac3d70416e7a863eb18995204630;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Fix AudioEffect error. Fixed not to throw an exception when it is not supported. Change-Id: I6f942ce4e31009433549418c436c16e4094511e2 Signed-off-by: coderhyme --- diff --git a/src/Tizen.Multimedia/Player/AudioEffect.cs b/src/Tizen.Multimedia/Player/AudioEffect.cs index afd95b9..e124c0a 100644 --- a/src/Tizen.Multimedia/Player/AudioEffect.cs +++ b/src/Tizen.Multimedia/Player/AudioEffect.cs @@ -26,13 +26,19 @@ namespace Tizen.Multimedia internal AudioEffect(Player owner) { - Log.Debug(PlayerLog.Tag, PlayerLog.Enter); Player = owner; bool available = false; int ret = Interop.Player.AudioEffectEqualizerIsAvailable(Player.GetHandle(), out available); PlayerErrorConverter.ThrowIfError(ret, "Failed to initialize the AudioEffect"); + IsAvailable = available; + + if (IsAvailable == false) + { + return; + } + int count = 0; ret = Interop.Player.AudioEffectGetEqualizerBandsCount(Player.GetHandle(), out count); PlayerErrorConverter.ThrowIfError(ret, "Failed to initialize the AudioEffect"); @@ -42,13 +48,11 @@ namespace Tizen.Multimedia ret = Interop.Player.AudioEffectGetEqualizerLevelRange(Player.GetHandle(), out min, out max); PlayerErrorConverter.ThrowIfError(ret, "Failed to initialize the AudioEffect"); - IsAvailable = available; Count = count; MinBandLevel = min; MaxBandLevel = max; _bands = new EqualizerBand[count]; - Log.Debug(PlayerLog.Tag, "available : " + available + ", count : " + count + ", min : " + min + ", max : " + max); } ///