2 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__
21 #define __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__
24 #include <wav_player.h>
33 * @file wav_player_internal.h
34 * @brief This file contains the WAV player internal API
38 * @addtogroup CAPI_MEDIA_WAV_PLAYER_MODULE
44 * @brief Plays a WAV file by simple
48 * @param[in] path The file path to play
49 * @param[in] stream_role The sound stream role
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
60 int wav_player_play_simple(const char *path, const char *stream_role);
64 * @brief Plays a WAV file after stopping previous WAV playbacks
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)
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
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,
99 #endif /* __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__ */