Imported Upstream version 1.7.1
[platform/upstream/edje.git] / src / modules / multisense_factory / multisense_factory.c
1 #include "config.h"
2 #include "edje_private.h"
3
4 #define DEFAULT_SAMPLERATE 44100
5
6 #ifdef HAVE_LIBREMIX
7 EAPI RemixBase *
8 multisense_sound_player_get(Edje_Multisense_Env *msenv)
9 {
10    RemixEnv *env = msenv->remixenv;
11    RemixPlugin *player_plugin;
12    RemixBase *player;
13
14    player_plugin = remix_find_plugin(env, "alsa_snd_player");
15    if (!player_plugin)
16      {
17         WRN("ALSA player_plugin init fail\n");
18         return remix_monitor_new(env);
19      }
20    player = remix_new(env, player_plugin, NULL);
21    return player;
22 }
23 #endif
24
25 EAPI Eina_Bool
26 multisense_factory_init(Edje_Multisense_Env *env __UNUSED__)
27 {
28 #ifdef HAVE_LIBREMIX
29    remix_set_samplerate(env->remixenv, DEFAULT_SAMPLERATE);
30    remix_set_channels(env->remixenv, REMIX_STEREO);
31 #endif
32    return EINA_TRUE;
33 }