*/
int sound_manager_get_current_media_playback_device_id(int *device_id);
+/**
+ * @internal
+ * @brief Sets sound effect methods that must need a reference device such as acoustic echo cancellation.
+ * @since_tizen 8.0
+ * @param[in] stream_info The handle of stream information
+ * @param[in] method The method of #sound_effect_method_with_reference_e
+ * @param[in] device_id The reference device id
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy
+ * @pre Get a device by calling sound_manager_get_device_list() and sound_manager_get_next_device().
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_set_effect_method()
+ * @see sound_manager_get_effect_method_with_reference()
+ */
+int sound_manager_set_effect_method_with_reference_by_id(sound_stream_info_h stream_info, sound_effect_method_with_reference_e method, int device_id);
+
/**
* @}
*/
int _set_effect_method_with_reference(sound_stream_info_h stream_info, sound_effect_method_with_reference_e method, sound_device_h device);
+int _set_effect_method_with_reference_by_id(sound_stream_info_h stream_info, sound_effect_method_with_reference_e method, int device_id);
+
int _get_effect_method_with_reference(sound_stream_info_h stream_info, sound_effect_method_with_reference_e *method, int *device_id);
int _set_effect_method(sound_stream_info_h stream_info, int method);
Name: capi-media-sound-manager
Summary: Sound Manager library
-Version: 0.7.11
+Version: 0.7.12
Release: 0
Group: Multimedia/API
License: Apache-2.0
return _get_current_media_routing_path("out", device_id, &unused);
}
+
+int sound_manager_set_effect_method_with_reference_by_id(sound_stream_info_h stream_info, sound_effect_method_with_reference_e method, int device_id)
+{
+ return _set_effect_method_with_reference_by_id(stream_info, method, device_id);
+}
return SOUND_MANAGER_ERROR_NONE;
}
+int _set_effect_method_with_reference_by_id(sound_stream_info_h stream_info, sound_effect_method_with_reference_e method, int device_id)
+{
+ sound_stream_info_s *stream_h = (sound_stream_info_s*)stream_info;
+
+ SM_ARG_CHECK(stream_h);
+
+ if (!stream_h->stream_conf_info.avail_in_devices[0]) {
+ LOGE("stream_h[%p, %s] does not support any input devices", stream_h, stream_h->stream_type);
+ return SOUND_MANAGER_ERROR_POLICY;
+ }
+
+ if (method == SOUND_MANAGER_STREAM_NO_METHOD ||
+ device_id == SOUND_MANAGER_STREAM_NO_REFERENCE_DEVICE)
+ return SOUND_MANAGER_ERROR_INVALID_PARAMETER;
+
+ stream_h->sound_effect.reference_method = method;
+ stream_h->sound_effect.reference_device_id = device_id;
+
+ LOGI("set a effect. stream_h[%p, %s], method[%d], reference device[id:%d]",
+ stream_h, stream_h->stream_type, method, device_id);
+
+ return SOUND_MANAGER_ERROR_NONE;
+}
+
int _get_effect_method_with_reference(sound_stream_info_h stream_info, sound_effect_method_with_reference_e *method, int *device_id)
{
sound_stream_info_s *stream_h = (sound_stream_info_s*)stream_info;