summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-04-17 18:49:53 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-04-18 19:14:32 +0100
commit76509b23406cb0349e183ddbf5a4f05c076b40ce (patch)
treee9ec67fd9021bacb7c0dc496f8295ea2474e6cca /src/lib/ecore_audio
parent8b8dc1fd6da25360636d922b491eb5c247c7ecc6 (diff)
ecore_audio: Implement notification when samplerate changes
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_in.c9
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_in.h3
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 =
20 EO_EVENT_DESCRIPTION("in,looped", "Called when an input has looped."); 20 EO_EVENT_DESCRIPTION("in,looped", "Called when an input has looped.");
21EAPI const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED = 21EAPI const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED =
22 EO_EVENT_DESCRIPTION("in,stopped", "Called when an input has stopped playing."); 22 EO_EVENT_DESCRIPTION("in,stopped", "Called when an input has stopped playing.");
23EAPI const Eo_Event_Description _ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED =
24 EO_EVENT_DESCRIPTION("in,samplerate,changed", "Called when the input samplerate has changed.");
23 25
24#define MY_CLASS ECORE_AUDIO_OBJ_IN_CLASS 26#define MY_CLASS ECORE_AUDIO_OBJ_IN_CLASS
25#define MY_CLASS_NAME "ecore_audio_obj_in" 27#define MY_CLASS_NAME "ecore_audio_obj_in"
@@ -37,8 +39,7 @@ static void _speed_set(Eo *eo_obj, void *_pd, va_list *list)
37 39
38 obj->speed = speed; 40 obj->speed = speed;
39 41
40 /* TODO: Notify output */ 42 eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED, NULL, NULL));
41
42} 43}
43 44
44static void _speed_get(Eo *eo_obj, void *_pd, va_list *list) 45static 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)
59 60
60 obj->samplerate = samplerate; 61 obj->samplerate = samplerate;
61 62
62 /* TODO: Notify output */ 63 eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED, NULL, NULL));
63
64} 64}
65 65
66static void _samplerate_get(Eo *eo_obj, void *_pd, va_list *list) 66static void _samplerate_get(Eo *eo_obj, void *_pd, va_list *list)
@@ -251,6 +251,7 @@ static const Eo_Op_Description op_desc[] = {
251static const Eo_Event_Description *event_desc[] = { 251static const Eo_Event_Description *event_desc[] = {
252 ECORE_AUDIO_EV_IN_LOOPED, 252 ECORE_AUDIO_EV_IN_LOOPED,
253 ECORE_AUDIO_EV_IN_STOPPED, 253 ECORE_AUDIO_EV_IN_STOPPED,
254 ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED,
254 NULL 255 NULL
255}; 256};
256 257
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;
118extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED; 118extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED;
119#define ECORE_AUDIO_EV_IN_STOPPED (&(_ECORE_AUDIO_EV_IN_STOPPED)) 119#define ECORE_AUDIO_EV_IN_STOPPED (&(_ECORE_AUDIO_EV_IN_STOPPED))
120 120
121extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED;
122#define ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED (&(_ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED))
123
121/** 124/**
122 * @} 125 * @}
123 */ 126 */