add wav_player_start_loop_stop_others internal api
[platform/core/api/wav-player.git] / include / wav_player_internal.h
1 /*
2 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18
19
20 #ifndef __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__
21 #define __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__
22
23 #include <tizen.h>
24 #include <wav_player.h>
25
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30
31
32 /**
33  * @file wav_player_internal.h
34  * @brief This file contains the WAV player internal API
35  */
36
37 /**
38  * @addtogroup CAPI_MEDIA_WAV_PLAYER_MODULE
39  * @{
40  */
41
42 /**
43  * @internal
44  * @brief Plays a WAV file by simple
45  * @since_tizen 6.0
46  *
47  *
48  * @param[in] path      The file path to play
49  * @param[in] stream_role       The sound stream role
50  *
51  * @return @c 0 on success,
52  *         otherwise a negative error value
53  * @retval #WAV_PLAYER_ERROR_NONE Successful
54  * @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
55  * @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
56  * @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format
57  * @retval #WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type
58  *
59  */
60 int wav_player_play_simple(const char *path, const char *stream_role);
61
62 /**
63  * @internal
64  * @brief Plays a WAV file after stopping previous WAV playbacks
65  * @since_tizen 7.0
66  *
67  * @param[in] path      The file path to play
68  * @param[in] stream_info       The sound stream information handle
69  * @param[in] loop_count        The number of times the file should be played (@c 0 indicates infinite loops)
70  * @param[in] callback  The callback function to be invoked when the WAV file is no longer being played
71  * @param[in] user_data The user data to be passed to the callback function
72  * @param[out] id       The WAV player ID (can be set to @c NULL)
73  *
74  * @return @c 0 on success,
75  *         otherwise a negative error value
76  * @retval #WAV_PLAYER_ERROR_NONE Successful
77  * @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
78  * @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
79  * @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format
80  * @retval #WAV_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type
81  *
82  */
83 int wav_player_start_loop_stop_others(const char *path,
84                                                                         sound_stream_info_h stream_info,
85                                                                         unsigned int loop_count,
86                                                                         wav_player_playback_completed_cb callback,
87                                                                         void *user_data,
88                                                                         int *id);
89
90
91 /**
92  * @}
93  */
94
95 #ifdef __cplusplus
96 }
97 #endif
98
99 #endif /* __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__ */