summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-12 18:47:21 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-12 22:32:39 +0900
commit99bf0732af88c4c17d26072bec69f09c7f218403 (patch)
treec93fc9fa2a69bb7b3151d49398595268f1e777f3
parentce0ea3c297dd2c03f7d1b881847bd812cbc31193 (diff)
edje - multisense - only complain once about being inable to play audio
no p[oint creating streams of noise, so only once.
-rw-r--r--src/lib/edje/edje_multisense.c48
1 files changed, 30 insertions, 18 deletions
diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index e8c0081d2f..58734e7d39 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -203,31 +203,43 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
203 if (!out) 203 if (!out)
204 { 204 {
205 205
206#ifdef _WIN32 206# ifdef _WIN32
207 out = efl_add(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 207 out = efl_add(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL));
208#else 208# else
209#if HAVE_PULSE 209# ifdef HAVE_PULSE
210 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 210 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
211#endif 211# endif
212#endif 212# endif
213 if (out) outs++; 213 if (out) outs++;
214 } 214 }
215 if (!out) 215 if (!out)
216 { 216 {
217#ifdef _WIN32 217 static Eina_Bool complained = EINA_FALSE;
218 ERR("Could not create multisense audio out (wasapi)"); 218
219#else 219 if (!complained)
220#if HAVE_PULSE 220 {
221 ERR("Could not create multisense audio out (pulse)"); 221 complained = EINA_TRUE;
222#endif 222# ifdef _WIN32
223#endif 223 ERR("Could not create multisense audio out (wasapi)");
224# else
225# ifdef HAVE_PULSE
226 ERR("Could not create multisense audio out (pulse)");
227# endif
228# endif
229 }
224 efl_del(in); 230 efl_del(in);
225 return EINA_FALSE; 231 return EINA_FALSE;
226 } 232 }
227 ret = ecore_audio_obj_out_input_attach(out, in); 233 ret = ecore_audio_obj_out_input_attach(out, in);
228 if (!ret) 234 if (!ret)
229 { 235 {
230 ERR("Could not attach input"); 236 static Eina_Bool complained = EINA_FALSE;
237
238 if (!complained)
239 {
240 complained = EINA_TRUE;
241 ERR("Could not attach input");
242 }
231 efl_del(in); 243 efl_del(in);
232 return EINA_FALSE; 244 return EINA_FALSE;
233 } 245 }
@@ -279,13 +291,13 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
279 291
280 if (!out) 292 if (!out)
281 { 293 {
282#ifdef _WIN32 294# ifdef _WIN32
283 out = efl_add(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 295 out = efl_add(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL));
284#else 296# else
285#if HAVE_PULSE 297# ifdef HAVE_PULSE
286 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 298 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
287#endif 299# endif
288#endif 300# endif
289 if (out) outs++; 301 if (out) outs++;
290 } 302 }
291 303