2 * Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 * http://www.apache.org/licenses/LICENSE-2.0
7 * Unless required by applicable law or agreed to in writing, software
8 * distributed under the License is distributed on an "AS IS" BASIS,
9 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 * See the License for the specific language governing permissions and
11 * limitations under the License.
15 #ifndef __TTS_SETTING_H__
16 #define __TTS_SETTING_H__
25 * @addtogroup TTS_SETTING_MODULE
34 * @brief Enumerations of error codes.
37 TTS_SETTING_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success, No error */
38 TTS_SETTING_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */
39 TTS_SETTING_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
40 TTS_SETTING_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,/**< Invalid parameter */
41 TTS_SETTING_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,/**< Permission denied */
42 TTS_SETTING_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< TTS is NOT supported */
43 TTS_SETTING_ERROR_INVALID_STATE = TIZEN_ERROR_TTS | 0x01, /**< Invalid state */
44 TTS_SETTING_ERROR_INVALID_VOICE = TIZEN_ERROR_TTS | 0x02, /**< Invalid voice */
45 TTS_SETTING_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_TTS | 0x03, /**< No available TTS-engine */
46 TTS_SETTING_ERROR_OPERATION_FAILED = TIZEN_ERROR_TTS | 0x04, /**< Operation failed */
47 TTS_SETTING_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_TTS | 0x06 /**< Not supported feature of current engine */
48 } tts_setting_error_e;
51 * @brief Definitions for male voice type.
53 #define TTS_SETTING_VOICE_TYPE_MALE 1
56 * @brief Definitions for female voice type.
58 #define TTS_SETTING_VOICE_TYPE_FEMALE 2
61 * @brief Definitions for child voice type.
63 #define TTS_SETTING_VOICE_TYPE_CHILD 3
66 * @brief Called to get a engine information.
68 * @param[in] engine_id Engine id.
69 * @param[in] engine_name Engine name.
70 * @param[in] setting_path Gadget path of engine specific setting.
71 * @param[in] user_data User data passed from the tts_setting_foreach_supported_engines().
73 * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop.
74 * @pre tts_setting_foreach_supported_engines() will invoke this callback.
76 * @see tts_setting_foreach_supported_engines()
78 typedef bool(*tts_setting_supported_engine_cb)(const char* engine_id, const char* engine_name, const char* setting_path, void* user_data);
81 * @brief Called to get a voice.
83 * @param[in] engine_id Engine id
84 * @param[in] language A language is specified as an ISO 3166 alpha-2 two letter country-code \n
85 * followed by ISO 639-1 for the two-letter language code.
86 * For example, "ko_KR" for Korean, "en_US" for American English..
87 * @param[in] voice_type Voice type
88 * @param[in] user_data User data passed from the tts_setting_foreach_surpported_voices()
90 * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop.
91 * @pre tts_setting_foreach_surpported_voices() will invoke this callback.
93 * @see tts_setting_foreach_surpported_voices()
95 typedef bool(*tts_setting_supported_voice_cb)(const char* engine_id, const char* language, int voice_type, void* user_data);
98 * @brief Called when the default engine is changed.
100 * @param[in] engine_id Engine id
101 * @param[in] user_data The user data passed from the callback registration function
103 * @pre An application registers this callback using tts_setting_set_engine_changed_cb().
105 * @see tts_setting_set_engine_changed_cb()
106 * @see tts_setting_unset_engine_changed_cb()
108 typedef void (*tts_setting_engine_changed_cb)(const char* engine_id, void *user_data);
111 * @brief Called when the default voice is changed.
113 * @param[in] language A language
114 * @param[in] voice_type Voice type
115 * @param[in] auto_voice Auto voice
116 * @param[in] user_data The user data passed from the callback registration function
118 * @pre An application registers this callback using registration function.
120 * @see tts_setting_set_voice_changed_cb()
121 * @see tts_setting_unset_voice_changed_cb()
123 typedef void (*tts_setting_voice_changed_cb)(const char* language, int voice_type, bool auto_voice, void *user_data);
126 * @brief Called when the default speed is changed.
128 * @param[in] speed Default speed
129 * @param[in] user_data The user data passed from the callback registration function
131 * @pre An application registers this callback using registration function.
133 * @see tts_setting_set_speed_changed_cb()
134 * @see tts_setting_unset_speed_changed_cb()
136 typedef void (*tts_setting_speed_changed_cb)(int speed, void *user_data);
139 * @brief Called when the default pitch is changed.
141 * @param[in] pitch Default pitch
142 * @param[in] user_data The user data passed from the callback registration function
144 * @pre An application registers this callback using registration function.
146 * @see tts_setting_set_pitch_changed_cb()
147 * @see tts_setting_unset_pitch_changed_cb()
149 typedef void (*tts_setting_pitch_changed_cb)(int pitch, void *user_data);
152 * @brief Called when the current background volume ratio is changed.
154 * @param[in] ratio Current background volume ratio
155 * @param[in] user_data The user data passed from the callback registration function
157 * @pre An application registers this callback using registration function.
159 * @see tts_setting_set_background_volume_ratio_changed_cb()
160 * @see tts_setting_unset_background_volume_ratio_changed_cb()
162 typedef void (*tts_setting_background_volume_ratio_changed_cb)(double ratio, void *user_data);
165 * @brief Initialize TTS setting.
167 * @remarks If the function succeeds, @a tts setting must be released with tts_setting_finalize().
169 * @return 0 on success, otherwise a negative error value.
170 * @retval #TTS_SETTING_ERROR_NONE Success.
171 * @retval #TTS_SETTING_ERROR_INVALID_STATE TTS setting has Already been initialized.
172 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
173 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
175 * @see tts_setting_finalize()
177 int tts_setting_initialize();
180 * @brief finalize TTS setting.
182 * @return 0 on success, otherwise a negative error value.
183 * @retval #TTS_SETTING_ERROR_NONE Success.
184 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
185 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
186 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
188 * @see tts_setting_initialize()
190 int tts_setting_finalize(void);
193 * @brief Retrieve supported engine informations using callback function.
195 * @param[in] callback Callback function
196 * @param[in] user_data User data to be passed to the callback function
198 * @return 0 on success, otherwise a negative error value.
199 * @retval #TTS_SETTING_ERROR_NONE Success.
200 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
201 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
202 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
204 * @post This function invokes tts_setting_supported_engine_cb() repeatedly for getting engine information.
206 * @see tts_setting_supported_engine_cb()
208 int tts_setting_foreach_supported_engines(tts_setting_supported_engine_cb callback, void* user_data);
211 * @brief Get current engine id.
213 * @remark If the function is success, @a engine_id must be released with free() by you.
215 * @param[out] engine_id Engine id
217 * @return 0 on success, otherwise a negative error value.
218 * @retval #TTS_SETTING_ERROR_NONE Success.
219 * @retval #TTS_SETTING_ERROR_OUT_OF_MEMORY Out of memory.
220 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
221 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
222 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
223 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
225 * @see tts_setting_set_engine()
227 int tts_setting_get_engine(char** engine_id);
230 * @brief Set current engine id.
232 * @param[in] engine_id Engine id
234 * @return 0 on success, otherwise a negative error value.
235 * @retval #TTS_SETTING_ERROR_NONE Success.
236 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
237 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
238 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
239 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
241 * @see tts_setting_get_engine()
243 int tts_setting_set_engine(const char* engine_id);
246 * @brief Get supported voices of current engine.
248 * @param[in] callback Callback function
249 * @param[in] user_data User data to be passed to the callback function
251 * @return 0 on success, otherwise a negative error value.
252 * @retval #TTS_SETTING_ERROR_NONE Success.
253 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
254 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
255 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
256 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
258 * @post This function invokes tts_setting_supported_voice_cb() repeatedly for getting supported voices.
260 * @see tts_setting_supported_voice_cb()
262 int tts_setting_foreach_supported_voices(tts_setting_supported_voice_cb callback, void* user_data);
265 * @brief Get a default voice of current engine.
267 * @remark If the function is success, @a language must be released with free() by you.
269 * @param[out] language Default language
270 * @param[out] voice_type Default voice type
272 * @return 0 on success, otherwise a negative error value.
273 * @retval #TTS_SETTING_ERROR_NONE Success.
274 * @retval #TTS_SETTING_ERROR_OUT_OF_MEMORY Out of memory.
275 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
276 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
277 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
278 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
280 * @see tts_setting_set_voice()
282 int tts_setting_get_voice(char** language, int* voice_type);
285 * @brief Set a default voice of current engine.
287 * @param[in] language Default language
288 * @param[in] voice_type Default voice type
290 * @return 0 on success, otherwise a negative error value.
291 * @retval #TTS_SETTING_ERROR_NONE Success.
292 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
293 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
294 * @retval #TTS_SETTING_ERROR_INVALID_VOICE Invalid voice.
295 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
296 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
298 * @see tts_setting_get_voice()
300 int tts_setting_set_voice(const char* language, int voice_type);
303 * @brief Get a automatic option of voice.
305 * @param[out] value Automatic option
307 * @return 0 on success, otherwise a negative error value.
308 * @retval #TTS_SETTING_ERROR_NONE Success.
309 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
310 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
311 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
312 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
314 * @see tts_setting_set_auto_voice()
316 int tts_setting_get_auto_voice(bool* value);
319 * @brief Set a automatic option of voice.
321 * @param[in] value Automatic option
323 * @return 0 on success, otherwise a negative error value.
324 * @retval #TTS_SETTING_ERROR_NONE Success.
325 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
326 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
327 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
328 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
330 * @see tts_setting_get_auto_voice()
332 int tts_setting_set_auto_voice(bool value);
335 * @brief Gets the speed range.
337 * @param[out] min The minimum speed value
338 * @param[out] normal The normal speed value
339 * @param[out] max The maximum speed value
341 * @return 0 on success, otherwise a negative error value
342 * @retval #TTS_SETTING_ERROR_NONE Success.
343 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
344 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
345 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
347 * @see tts_setting_get_speed()
348 * @see tts_setting_set_speed()
350 int tts_setting_get_speed_range(int* min, int* normal, int* max);
353 * @brief Get default speed.
355 * @param[out] speed Default voice speed
357 * @return 0 on success, otherwise a negative error value.
358 * @retval #TTS_SETTING_ERROR_NONE Success.
359 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
360 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
361 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
362 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
364 * @see tts_setting_get_speed_range()
365 * @see tts_setting_set_speed()
367 int tts_setting_get_speed(int* speed);
370 * @brief Set default speed.
372 * @param[in] speed Default voice speed
374 * @return 0 on success, otherwise a negative error value.
375 * @retval #TTS_SETTING_ERROR_NONE Success.
376 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
377 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
378 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
379 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
381 * @see tts_setting_get_speed_range()
382 * @see tts_setting_get_speed()
384 int tts_setting_set_speed(int speed);
387 * @brief Gets the pitch range.
389 * @param[out] min The minimum pitch value
390 * @param[out] normal The normal pitch value
391 * @param[out] max The maximum pitch value
393 * @return 0 on success, otherwise a negative error value
394 * @retval #TTS_SETTING_ERROR_NONE Success.
395 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
396 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
397 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
399 * @see tts_setting_get_pitch()
400 * @see tts_setting_set_pitch()
402 int tts_setting_get_pitch_range(int* min, int* normal, int* max);
405 * @brief Set a default pitch.
407 * @param[out] pitch Default voice pitch
409 * @return 0 on success, otherwise a negative error value.
410 * @retval #TTS_SETTING_ERROR_NONE Success.
411 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
412 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
413 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
414 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED_FEATURE Not supported feature.
415 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
417 * @see tts_setting_get_pitch_range()
418 * @see tts_setting_set_pitch()
420 int tts_setting_get_pitch(int* pitch);
423 * @brief Set a default pitch.
425 * @param[in] pitch Default voice pitch
427 * @return 0 on success, otherwise a negative error value.
428 * @retval #TTS_SETTING_ERROR_NONE Success.
429 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
430 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
431 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
432 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED_FEATURE Not supported feature.
433 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
435 * @see tts_setting_get_pitch_range()
436 * @see tts_setting_get_pitch()
438 int tts_setting_set_pitch(int pitch);
441 * @brief Gets a current background volume ratio.
443 * @param[out] ratio Current background volume ratio
445 * @return 0 on success, otherwise a negative error value.
446 * @retval #TTS_SETTING_ERROR_NONE Success.
447 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
448 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
449 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
450 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED_FEATURE Not supported feature.
451 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
453 * @see tts_setting_set_background_volume_ratio()
455 int tts_setting_get_background_volume_ratio(double *ratio);
458 * @brief Sets a current background volume ratio.
460 * @param[in] ratio Current background volume ratio (Range 0.0 ~ 1.0)
462 * @return 0 on success, otherwise a negative error value.
463 * @retval #TTS_SETTING_ERROR_NONE Success.
464 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter.
465 * @retval #TTS_SETTING_ERROR_INVALID_STATE Not initialized.
466 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Operation failure.
467 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED_FEATURE Not supported feature.
468 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
470 * @see tts_setting_get_background_volume_ratio()
472 int tts_setting_set_background_volume_ratio(double ratio);
475 * @brief Registers a callback function to be called when engine information is changed
477 * @param[in] callback The callback function to register
478 * @param[in] user_data The user data to be passed to the callback function
480 * @return 0 on success, otherwise a negative error value
481 * @retval #TTS_SETTING_ERROR_NONE Successful
482 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter
483 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
484 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
486 * @see tts_setting_engine_changed_cb()
487 * @see tts_setting_unset_engine_changed_cb()
489 int tts_setting_set_engine_changed_cb(tts_setting_engine_changed_cb callback, void* user_data);
492 * @brief Unregisters the callback function
494 * @return 0 on success, otherwise a negative error value
495 * @retval #TTS_SETTING_ERROR_NONE Successful
496 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
497 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
499 * @see tts_setting_set_engine_changed_cb()
501 int tts_setting_unset_engine_changed_cb();
504 * @brief Registers a callback function to be called when default voice is changed
506 * @param[in] callback The callback function to register
507 * @param[in] user_data The user data to be passed to the callback function
509 * @return 0 on success, otherwise a negative error value
510 * @retval #TTS_SETTING_ERROR_NONE Successful
511 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter
512 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
513 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
515 * @see tts_setting_voice_changed_cb()
516 * @see tts_setting_unset_voice_changed_cb()
518 int tts_setting_set_voice_changed_cb(tts_setting_voice_changed_cb callback, void* user_data);
521 * @brief Unregisters the callback function
523 * @return 0 on success, otherwise a negative error value
524 * @retval #TTS_SETTING_ERROR_NONE Successful
525 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
526 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
528 * @see tts_setting_set_voice_changed_cb()
530 int tts_setting_unset_voice_changed_cb();
533 * @brief Registers a callback function to be called when default speed is changed
535 * @param[in] callback The callback function to register
536 * @param[in] user_data The user data to be passed to the callback function
538 * @return 0 on success, otherwise a negative error value
539 * @retval #TTS_SETTING_ERROR_NONE Successful
540 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter
541 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
542 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
544 * @see tts_setting_speed_changed_cb()
545 * @see tts_setting_unset_speed_changed_cb()
547 int tts_setting_set_speed_changed_cb(tts_setting_speed_changed_cb callback, void* user_data);
550 * @brief Unregisters the callback function
552 * @return 0 on success, otherwise a negative error value
553 * @retval #TTS_SETTING_ERROR_NONE Successful
554 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
555 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
557 * @see tts_setting_set_speed_changed_cb()
559 int tts_setting_unset_speed_changed_cb();
562 * @brief Registers a callback function to be called when default pitch is changed
564 * @param[in] callback The callback function to register
565 * @param[in] user_data The user data to be passed to the callback function
567 * @return 0 on success, otherwise a negative error value
568 * @retval #TTS_SETTING_ERROR_NONE Successful
569 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter
570 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
571 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
573 * @see tts_setting_pitch_changed_cb()
574 * @see tts_setting_unset_pitch_changed_cb()
576 int tts_setting_set_pitch_changed_cb(tts_setting_pitch_changed_cb callback, void* user_data);
579 * @brief Unregisters the callback function
581 * @return 0 on success, otherwise a negative error value
582 * @retval #TTS_SETTING_ERROR_NONE Successful
583 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
584 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
586 * @see tts_setting_set_pitch_changed_cb()
588 int tts_setting_unset_pitch_changed_cb();
592 * @brief Sets a callback function to be called when current background volume is changed
594 * @param[in] callback The callback function to register
595 * @param[in] user_data The user data to be passed to the callback function
597 * @return 0 on success, otherwise a negative error value
598 * @retval #TTS_SETTING_ERROR_NONE Successful
599 * @retval #TTS_SETTING_ERROR_INVALID_PARAMETER Invalid parameter
600 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
601 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
603 * @see tts_setting_background_volume_ratio_changed_cb()
604 * @see tts_setting_unset_background_volume_ratio_changed_cb()
606 int tts_setting_set_background_volume_ratio_changed_cb(tts_setting_background_volume_ratio_changed_cb callback, void* user_data);
609 * @brief Unsets the callback function
611 * @return 0 on success, otherwise a negative error value
612 * @retval #TTS_SETTING_ERROR_NONE Successful
613 * @retval #TTS_SETTING_ERROR_OPERATION_FAILED Invalid state
614 * @retval #TTS_SETTING_ERROR_NOT_SUPPORTED TTS NOT supported
616 * @see tts_setting_set_background_volume_ratio_changed_cb()
618 int tts_setting_unset_background_volume_ratio_changed_cb();
628 #endif /* __TTS_SETTING_H__ */