diff options
author | Yunmi Ha <yunmi.ha@samsung.com> | 2020-03-19 18:35:11 +0900 |
---|---|---|
committer | Hyotaek Shim <hyotaek.shim@samsung.com> | 2020-03-20 05:04:11 +0000 |
commit | c76678a73f8ca486689781f8ec0d3cd046502059 (patch) | |
tree | b6bbd33368097c41e52c81e4439de8d5b2d51850 | |
parent | c6bd7f116c156d01163f7b2f93b92201d73a6f76 (diff) | |
download | libsvi-accepted/tizen_5.5_unified.tar.gz libsvi-accepted/tizen_5.5_unified.tar.bz2 libsvi-accepted/tizen_5.5_unified.zip |
Add sound_stop functionsubmit/tizen_5.5_wearable_hotfix/20201026.184304submit/tizen_5.5/20200326.054543accepted/tizen/5.5/unified/wearable/hotfix/20201027.112331accepted/tizen/5.5/unified/20200326.232352tizen_5.5_wearable_hotfixaccepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified
- When called this API, whole exist keytones will be stopped.
Change-Id: I5a11326e8b11f0e1e4532be615a0a84ed6fc6edd
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
(cherry picked from commit 159e87c34efdc51f463c4e92152f95918129dcdc)
-rw-r--r-- | src/sound.c | 18 |
1 files changed, 18 insertions, 0 deletions
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, |