diff options
author | Daniel Willmann <d.willmann@samsung.com> | 2013-04-17 18:49:53 +0100 |
---|---|---|
committer | Daniel Willmann <d.willmann@samsung.com> | 2013-04-18 19:14:32 +0100 |
commit | 76509b23406cb0349e183ddbf5a4f05c076b40ce (patch) | |
tree | e9ec67fd9021bacb7c0dc496f8295ea2474e6cca | |
parent | 8b8dc1fd6da25360636d922b491eb5c247c7ecc6 (diff) | |
download | efl-76509b23406cb0349e183ddbf5a4f05c076b40ce.tar.gz |
ecore_audio: Implement notification when samplerate changes
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
-rw-r--r-- | src/lib/ecore_audio/ecore_audio_obj_in.c | 9 | ||||
-rw-r--r-- | src/lib/ecore_audio/ecore_audio_obj_in.h | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/ecore_audio/ecore_audio_obj_in.c b/src/lib/ecore_audio/ecore_audio_obj_in.c index 704e27d68c..92dc48d982 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_in.c +++ b/src/lib/ecore_audio/ecore_audio_obj_in.c @@ -20,6 +20,8 @@ EAPI const Eo_Event_Description _ECORE_AUDIO_EV_IN_LOOPED = EO_EVENT_DESCRIPTION("in,looped", "Called when an input has looped."); EAPI const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED = EO_EVENT_DESCRIPTION("in,stopped", "Called when an input has stopped playing."); +EAPI const Eo_Event_Description _ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED = + EO_EVENT_DESCRIPTION("in,samplerate,changed", "Called when the input samplerate has changed."); #define MY_CLASS ECORE_AUDIO_OBJ_IN_CLASS #define MY_CLASS_NAME "ecore_audio_obj_in" @@ -37,8 +39,7 @@ static void _speed_set(Eo *eo_obj, void *_pd, va_list *list) obj->speed = speed; - /* TODO: Notify output */ - + eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED, NULL, NULL)); } static void _speed_get(Eo *eo_obj, void *_pd, va_list *list) @@ -59,8 +60,7 @@ static void _samplerate_set(Eo *eo_obj, void *_pd, va_list *list) obj->samplerate = samplerate; - /* TODO: Notify output */ - + eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED, NULL, NULL)); } static void _samplerate_get(Eo *eo_obj, void *_pd, va_list *list) @@ -251,6 +251,7 @@ static const Eo_Op_Description op_desc[] = { static const Eo_Event_Description *event_desc[] = { ECORE_AUDIO_EV_IN_LOOPED, ECORE_AUDIO_EV_IN_STOPPED, + ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED, NULL }; diff --git a/src/lib/ecore_audio/ecore_audio_obj_in.h b/src/lib/ecore_audio/ecore_audio_obj_in.h index 6da0ec2b81..f2aa6e3290 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_in.h +++ b/src/lib/ecore_audio/ecore_audio_obj_in.h @@ -118,6 +118,9 @@ extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_LOOPED; extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED; #define ECORE_AUDIO_EV_IN_STOPPED (&(_ECORE_AUDIO_EV_IN_STOPPED)) +extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED; +#define ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED (&(_ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED)) + /** * @} */ |