diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/edje/src/modules/multisense_factory/multisense_factory.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libraries/edje/src/modules/multisense_factory/multisense_factory.c b/libraries/edje/src/modules/multisense_factory/multisense_factory.c new file mode 100644 index 0000000..f89ae9b --- /dev/null +++ b/libraries/edje/src/modules/multisense_factory/multisense_factory.c | |||
@@ -0,0 +1,33 @@ | |||
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) | ||
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 | } | ||