summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_multisense.c
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2015-04-15 16:53:39 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-07 09:53:07 +0200
commit62e29b39f4df40fd3c0a6b17f7a16f0f8fc1d0c9 (patch)
treeef94069e64c3d00e792a55fc4bc9147b054cffa1 /src/lib/edje/edje_multisense.c
parenta53c52dee0a3906d1ed3628396929127bcb665ea (diff)
ecore_audio: integrate Apple's CoreAudio to play sounds on OS X.
Summary: Ecore_Audio now supports Apple's CoreAudio to play sounds read by libsndfile. edje_multisense integrates this new feature to enable PLAY_SAMPLE on OS X. Test Plan: Compiles, links and installs fine on OS X. Run terminology and elementary_test to hear sound played on user input. Reviewers: raster, naguirre, cedric Reviewed By: cedric Subscribers: plamot, cedric Differential Revision: https://phab.enlightenment.org/D2295 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_multisense.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index da24e0cf4a..913c1f9a89 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -204,13 +204,21 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
204 eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL)); 204 eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
205 if (!out) 205 if (!out)
206 { 206 {
207#if HAVE_COREAUDIO
208 out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
209#elif HAVE_PULSE
207 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, 210 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
208 eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 211 eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
212#endif
209 if (out) outs++; 213 if (out) outs++;
210 } 214 }
211 if (!out) 215 if (!out)
212 { 216 {
217#if HAVE_COREAUDIO
218 ERR("Could not create multisense audio out (CoreAudio)");
219#elif HAVE_PULSE
213 ERR("Could not create multisense audio out (pulse)"); 220 ERR("Could not create multisense audio out (pulse)");
221#endif
214 eo_del(in); 222 eo_del(in);
215 return EINA_FALSE; 223 return EINA_FALSE;
216 } 224 }
@@ -269,8 +277,12 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
269 277
270 if (!out) 278 if (!out)
271 { 279 {
280#if HAVE_COREAUDIO
281 out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
282#elif HAVE_PULSE
272 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, 283 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
273 eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 284 eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
285#endif
274 if (out) outs++; 286 if (out) outs++;
275 } 287 }
276 288