WAV_PLAYER_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
WAV_PLAYER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
WAV_PLAYER_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */
- WAV_PLAYER_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported (Since 3.0) */
- WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED = TIZEN_ERROR_WAV_PLAYER | 0x01 /**< Format not supported */
+ WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED = TIZEN_ERROR_WAV_PLAYER | 0x01, /**< Format not supported */
+ WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE = TIZEN_ERROR_WAV_PLAYER | 0x02 /**< Not supported (Since 3.0) */
} wav_player_error_e;
/**
* @retval #WAV_PLAYER_ERROR_NONE Successful
* @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format
*
* @post It invokes wav_player_playback_completed_cb() when a WAV file has finished playing.
* @see wav_player_stop()
/**
* @brief Plays a WAV file with stream information of sound-manager.
* @since_tizen 3.0
+ *
+ * @remarks Voice Recognition and VOIP stream types are not supported in this API.
+ *
* @param[in] path The file path to play
* @param[in] stream_info The sound stream information handle
* @param[in] callback The callback function to be invoked when a WAV file is no longer being played
* @retval #WAV_PLAYER_ERROR_NONE Successful
* @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WAV_PLAYER_ERROR_NOT_SUPPORTED Not supported
+ * @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format
+ * @retval #WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type
*
* @post It invokes wav_player_playback_completed_cb() when a WAV file is no longer being played.
* @see wav_player_stop()
_cb_data *cb_data = NULL;
char *stream_type = NULL;
int stream_id;
+ bool result = false;
if( path == NULL)
return __convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
+ ret = sound_manager_is_available_stream_information(stream_info, NATIVE_API_WAV_PLAYER, &result);
+ if ( !result )
+ return __convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE);
+
ret = sound_manager_get_type_from_stream_information(stream_info, &stream_type);
if( ret )
return __convert_wav_player_error_code(__func__, ret);
ret = WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED;
errorstr = "FORMAT_NOT_SUPPORTED";
break;
+ case WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE:
+ ret = WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE;
+ errorstr = "NOT_SUPPORTED_TYPE";
+ break;
default:
ret = WAV_PLAYER_ERROR_INVALID_OPERATION;
errorstr = "INVALID_OPERATION";