diff options
author | Yunmi Ha <yunmi.ha@samsung.com> | 2020-03-19 18:35:11 +0900 |
---|---|---|
committer | Yunmi Ha <yunmi.ha@samsung.com> | 2020-03-19 18:35:11 +0900 |
commit | 159e87c34efdc51f463c4e92152f95918129dcdc (patch) | |
tree | a401bcbe703b6c691f2918bc56bd3103d5621b7c | |
parent | d9db933e164ec9647ee65dbfcf54ab2c050a3d13 (diff) | |
download | libsvi-159e87c34efdc51f463c4e92152f95918129dcdc.tar.gz libsvi-159e87c34efdc51f463c4e92152f95918129dcdc.tar.bz2 libsvi-159e87c34efdc51f463c4e92152f95918129dcdc.zip |
Add sound_stop functionsubmit/tizen/20200402.112144accepted/tizen/unified/20200406.133208
- When called this API, whole exist keytones will be stopped.
Change-Id: I5a11326e8b11f0e1e4532be615a0a84ed6fc6edd
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
-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, |