From a28cad61ddfbac3d70416e7a863eb18995204630 Mon Sep 17 00:00:00 2001 From: coderhyme Date: Mon, 6 Mar 2017 09:51:34 +0900 Subject: [PATCH] Fix AudioEffect error. Fixed not to throw an exception when it is not supported. Change-Id: I6f942ce4e31009433549418c436c16e4094511e2 Signed-off-by: coderhyme --- src/Tizen.Multimedia/Player/AudioEffect.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Tizen.Multimedia/Player/AudioEffect.cs b/src/Tizen.Multimedia/Player/AudioEffect.cs index afd95b92e..e124c0a2c 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); } /// -- 2.34.1