From: Yunmi Ha Date: Thu, 19 Mar 2020 09:35:11 +0000 (+0900) Subject: Add sound_stop function X-Git-Tag: submit/tizen/20200402.112144^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=159e87c34efdc51f463c4e92152f95918129dcdc;p=platform%2Fcore%2Fsystem%2Flibsvi.git Add sound_stop function - When called this API, whole exist keytones will be stopped. Change-Id: I5a11326e8b11f0e1e4532be615a0a84ed6fc6edd Signed-off-by: Yunmi Ha --- diff --git a/src/sound.c b/src/sound.c index 8e54a8d..886b707 100644 --- a/src/sound.c +++ b/src/sound.c @@ -219,6 +219,23 @@ static int sound_is_supported(feedback_pattern_e pattern, bool *supported) return 0; } +static int sound_stop(void) +{ + int ret; + + /** + * @param filename [in] keytone filename to stop (can be null if whole exist keytones needs stops) + * int mm_sound_stop_keysound(const char *filename); + */ + ret = mm_sound_stop_keysound(NULL); + if (ret == MM_ERROR_NONE) { + _D("stop success!"); + return 0; + } + _E("mm_sound_stop_keysound() returned error(%d)", ret); + return ret; +} + //LCOV_EXCL_START Not used function static int sound_get_path(feedback_pattern_e pattern, char *buf, unsigned int buflen) { @@ -311,6 +328,7 @@ static const struct device_ops sound_device_ops = { .init = sound_init, .exit = sound_exit, .play = sound_play, + .stop = sound_stop, .is_supported = sound_is_supported, .get_path = sound_get_path, .set_path = sound_set_path,