Add the code for checking available soundtype
authorEonseokLee <eonseok.lee@samsung.com>
Wed, 10 Apr 2013 01:22:01 +0000 (10:22 +0900)
committerEonseokLee <eonseok.lee@samsung.com>
Wed, 10 Apr 2013 01:22:01 +0000 (10:22 +0900)
Change-Id: I42280759393fffd3ef6c1e0a48cef0e9be1c71c7
Signed-off-by: EonseokLee <eonseok.lee@samsung.com>
src/FMedia_PlayerImpl.cpp

index 1694bbe..f3ae16f 100644 (file)
@@ -2194,6 +2194,9 @@ _PlayerImpl::SetAudioStreamType(AudioStreamType type)
 
        SysAssertf(__hPlayer !=  null, "Not yet constructed! Construct() should be called before use");
 
+       SysTryReturn(NID_MEDIA, type != AUDIO_STREAM_TYPE_NO_SOUND      , E_INVALID_ARG, E_INVALID_ARG,
+                       "Invalid argument is used. AudioStream type = %d", type);
+
        ret = player_set_sound_type(__hPlayer, _AudioManagerConvert::ConvertAudioStreamType2SoundType(type));
        r = MapExceptionToResult(ret);
        SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Failed to perform player_set_sound_type operation with 0x%x", GetErrorMessage(r), ret);