4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungbae Shin <seungbae.shin@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
24 * @brief Application interface library for sound module.
28 * Application interface library for sound module.
31 #ifndef __MM_SOUND_PRIVATE_H__
32 #define __MM_SOUND_PRIVATE_H__
44 @addtogroup SOUND_PRIVATE
49 #define MM_SOUND_VOLUME_CONFIG_TYPE(vol) (vol & 0x00FF)
52 const char *filename; /**< filename to play */
53 bool skip_session; /**< skip session control */
54 int volume; /**< relative volume level */
55 int loop; /**< loop count */
56 mm_sound_stop_callback_func callback; /**< callback function when playing is terminated */
57 void *data; /**< user data to callback */
58 void *mem_ptr; /**< memory buffer to play */
59 int mem_size; /**< size of memory buffer */
60 int volume_config; /**< volume type & volume gain */
64 * This function is to play system sound with specified parameters.
66 * @param param [in] Reference pointer to MMSoundPlayParam structure
67 * @param handle [out] Handle of sound play.
69 * @return This function returns MM_ERROR_NONE on success, or negative value
71 * @remark When the stop callback is set, it will be called when system sound is
72 * terminated. If mm_sound_stop_sound() is called apparently before
73 * system sound is terminated, stop_callback will not be called.
74 * This function can use various sound route path with mm_sound_set_path
75 * @see mm_sound_stop_sound mm_sound_set_path
79 int mm_sound_play_sound_ex(MMSoundPlayParam *param, int *handle);
81 int mm_sound_play_sound_with_stream_info(const char *filename, char *stream_type, int stream_id, unsigned int loop, mm_sound_stop_callback_func _completed_cb, void *data, int *handle);
84 * This function is to play key sound.
86 * @param filename [in] keytone filename to play
87 * @param volume_config [in] Volume type & volume gain
89 * @return This function returns MM_ERROR_NONE on success, or negative value
92 * @remark This function provide low latency sound play (such as dialer keytone)
93 * using fixed spec of wave file (44100Hz, mono channel)
94 * @see volume_type_t volume_gain_t mm_sound_volume_set_value
96 int mm_sound_play_keysound(const char *filename, int volume_config);
98 int mm_sound_boot_ready(int timeout_sec);
100 int mm_sound_boot_play_sound(char* path);
110 #endif /* __MM_SOUND_H__ */