2 * Copyright (c) 2011 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.
17 #ifndef __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__
18 #define __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__
21 #include <sound_manager.h>
29 * @file wav_player_internal.h
30 * @brief This file contains the WAV player API.
34 * @brief Plays a WAV file.
35 * @param[in] path The WAV file path to play
36 * @param[in] type The sound type
37 * @param[in] callback The callback function to invoke when a WAV file is finished playing
38 * @param[in] user_data The user data to be passed to the callback function
39 * @param[in] loop_count The number of loops for playing (-1 for infinite playing)
40 * @param[out] id The WAV player ID ( can be set to NULL )
42 * @return 0 on success, otherwise a negative error value.
43 * @retval #WAV_PLAYER_ERROR_NONE Successful
44 * @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
45 * @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
47 * @post It invokes wav_player_playback_completed_cb() when a WAV file has finished playing.
48 * @see wav_player_stop()
49 * @see wav_player_playback_completed_cb()
51 int wav_player_start_loop (const char *path, sound_type_e type, wav_player_playback_completed_cb cb, void *user_data, int loop_count, int * id);
54 * @brief Plays a WAV file (with no session, other streams will be muted).
55 * @param[in] path The WAV file path to play
56 * @param[in] type The sound type
57 * @param[in] force_to_route_spk Route output path to speaker
58 * @param[in] callback The callback function to invoke when a WAV file is finished playing
59 * @param[in] user_data The user data to be passed to the callback function
60 * @param[out] id The WAV player ID ( can be set to NULL )
62 * @return 0 on success, otherwise a negative error value.
63 * @retval #WAV_PLAYER_ERROR_NONE Successful
64 * @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
65 * @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
67 * @post It invokes wav_player_playback_completed_cb() when a WAV file has finished playing.
68 * @see wav_player_stop()
69 * @see wav_player_playback_completed_cb()
71 int wav_player_start_solo(const char *path, sound_type_e type, bool force_to_route_spk, wav_player_playback_completed_cb cb, void *user_data, int * id);
74 * @brief Plays a WAV file (with no session, other streams will be muted).
75 * @param[in] path The WAV file path to play
76 * @param[in] type The sound type
77 * @param[in] callback The callback function to invoke when a WAV file is finished playing
78 * @param[in] user_data The user data to be passed to the callback function
79 * @param[in] loop_count The number of loops for playing (-1 for infinite playing)
80 * @param[out] id The WAV player ID ( can be set to NULL )
82 * @return 0 on success, otherwise a negative error value.
83 * @retval #WAV_PLAYER_ERROR_NONE Successful
84 * @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
85 * @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
87 * @post It invokes wav_player_playback_completed_cb() when a WAV file has finished playing.
88 * @see wav_player_stop()
89 * @see wav_player_playback_completed_cb()
91 int wav_player_start_solo_loop(const char *path, sound_type_e type, wav_player_playback_completed_cb cb, void *user_data, int loop_count, int * id);
97 #endif /* __TIZEN_MEDIA_WAV_PLAYER_INTERNAL_H__ */