E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: module.desktop Log Message: Fix up module.desktop descriptions for new box width. === RCS file: /cvs/e/e_modules/mixer/module.desktop,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- module.desktop 4 Nov 2007 15:38:18 - 1.3 +++ module.desktop 30 Dec 2007 19:49:24 - 1.4 @@ -2,5 +2,5 @@ Type=Link Name=Mixer Icon=e-module-mixer -Comment=Mixer GadgetAllows you to control your systemvolume. -Comment[it]=Modulo MixerPermette di controllare il volumedell'audio del sistema. +Comment=Mixer GadgetAllows you to control your system volume. +Comment[it]=Modulo MixerPermette di controllare il volume dell'audio del sistema. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: If the mixer is muted, keep the icon matching. Fix formatting & whitespace removal. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -3 -r1.78 -r1.79 --- e_mod_main.c22 Dec 2007 21:00:25 - 1.78 +++ e_mod_main.c22 Dec 2007 21:29:33 - 1.79 @@ -28,9 +28,9 @@ /* Module Protos */ static void _mixer_simple_volume_change (Mixer *mixer, Config_Item *ci, double val); -static void _mixer_volume_change(Mixer *mixer, Config_Item *ci, int channel_id, double val); +static void _mixer_volume_change(Mixer *mixer, Config_Item *ci, double val); static void _mixer_simple_mute_toggle (Mixer *mixer, Config_Item *ci); -static void _mixer_mute_toggle (Mixer *mixer, Config_Item *ci, int channel_id); +static void _mixer_mute_toggle (Mixer *mixer, Config_Item *ci); static Config_Item *_mixer_config_item_get (void *data, const char *id); static void _mixer_menu_cb_post (void *data, E_Menu *m); @@ -77,14 +77,14 @@ static E_Gadcon_Client * _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style) { - Instance*inst; - Mixer *mixer; + Instance *inst; + Mixer *mixer; E_Gadcon_Client *gcc; - char buf[4096]; - + char buf[4096]; + inst = E_NEW(Instance, 1); if (!inst) return NULL; - + mixer = E_NEW(Mixer, 1); if (!mixer) return NULL; mixer->inst = inst; @@ -106,20 +106,20 @@ /* Defer this until after the mixer system has been setup */ inst->ci = _mixer_config_item_get(mixer, id); - if ((mixer->mix_sys->get_volume) && (inst->ci->card_id != 0) && (inst->ci->channel_id != 0)) + if ((mixer->mix_sys->get_volume) && (inst->ci->channel_id != 0)) { int ret; ret = mixer->mix_sys->get_volume(inst->ci->card_id, inst->ci->channel_id); if (ret < 33) edje_object_signal_emit(mixer->base, "low", ""); - else if ((ret >= 34) && (ret < 66)) + else if ((ret >= 33) && (ret < 66)) edje_object_signal_emit(mixer->base, "medium", ""); - else if (ret > 66) + else if (ret >= 66) edje_object_signal_emit(mixer->base, "high", ""); } - if ((mixer->mix_sys->get_mute) && (inst->ci->card_id != 0) && (inst->ci->channel_id != 0)) + if ((mixer->mix_sys->get_mute) && (inst->ci->channel_id != 0)) { int m; @@ -148,8 +148,8 @@ _gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; - Mixer*mixer; - + Mixer *mixer; + inst = gcc->data; if (!inst) return; mixer = inst->mixer; @@ -158,7 +158,7 @@ if (mixer->mix_sys) _mixer_system_shutdown(mixer->mix_sys); if (mixer->base) evas_object_del(mixer->base); if (mixer->gauge_win) _mixer_window_gauge_free(mixer->gauge_win); - + mixer_config->instances = evas_list_remove(mixer_config->instances, inst); E_FREE(mixer); E_FREE(inst); @@ -194,7 +194,7 @@ static const char * _gc_id_new(void) { - int num = 0; + int num = 0; char buf[128]; Config_Item *ci; @@ -218,7 +218,7 @@ _mixer_window_gauge_pop_up(inst); - if (!inst || !inst->mixer) return; + if ((!inst) || (!inst->mixer)) return; win = inst->mixer->gauge_win; _mixer_volume_increase(inst->mixer, inst->ci); @@ -229,7 +229,7 @@ void mixer_vol_decrease(Instance *inst) { - Mixer_Win_Gauge *win; + Mixer_Win_Gauge *win; _mixer_window_gauge_pop_up(inst); @@ -245,7 +245,6 @@ mixer_mute_toggle(Instance *inst) { if ((!inst) || (!inst->mixer)) return; - _mixer_simple_mute_toggle(inst->mixer, inst->ci); } @@ -265,7 +264,7 @@ if ((ev->button == 3) && (!mixer_config->menu)) { zone = e_util_zone_current_get(e_manager_current_get()); - + mn = e_menu_new(); e_menu_post_deactivate_callback_set(mn, _mixer_menu_cb_post, inst); mixer_config->menu = mn; @@ -301,8 +300,7 @@ { Evas_Event_Mouse_Wheel *ev; Mixer *mixer; - int vol; - int dir = 0; + int vol, dir = 0; int step = 4; double val; @@ -415,13 +413,13 @@ { Mixer *mixer; Mixer_System *sys; - + if (!(mixer = data)) return; sys = E_NEW(Mixer_System, 1); if (!sys) return; mixer->mix_sys = sys; - + #if defined(HAVE_ALSA) sys->get_cards = alsa_get_cards; sys->get_card = alsa_get_card; @@ -527,7 +525,7 @@ } mixer_register_module_actions(); mixer_register_module_keybindings(); - + mixer_config->module = m; e_gadcon_provider_register(&_gc_class); @@ -584,13 +582,12 @@ { if (!mixer) return; if (!ci) return; - - _mixer_volume_change(mixer, c
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c e_mod_main.c Log Message: Fix formatting. Fix setting mute/unmute & storing volume. Fix slider direction; actually works as it should now. Fix slider value; goes from 0 - 100 now. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -3 -r1.39 -r1.40 --- alsa_mixer.c22 Dec 2007 20:33:03 - 1.39 +++ alsa_mixer.c22 Dec 2007 21:00:25 - 1.40 @@ -340,11 +340,9 @@ snd_mixer_selem_get_id(elem, sid); if (!snd_mixer_selem_is_active(elem)) continue; - if (muted && !snd_mixer_selem_has_playback_switch(elem)) - { -v = (vol < 0) ? -vol: vol; -ecore_hash_set(vols, (int*)(card_id << 16) + channel_id, (int*)v); - } + if ((muted) && (!snd_mixer_selem_has_playback_switch(elem))) + ecore_hash_set(vols, (int*)(card_id << 16) + channel_id, (int*)alsa_get_volume(card_id, channel_id)); + if (snd_mixer_selem_has_playback_volume(elem)) { const char *name; @@ -465,7 +463,6 @@ ecore_hash_free_key_cb_set(vols, NULL); ecore_hash_free_value_cb_set(vols, NULL); } - if (mute) { muted = 1; === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -3 -r1.77 -r1.78 --- e_mod_main.c22 Dec 2007 20:33:03 - 1.77 +++ e_mod_main.c22 Dec 2007 21:00:25 - 1.78 @@ -606,9 +606,9 @@ { if (val < 33) edje_object_signal_emit(mixer->base, "low", ""); -else if ((val >= 34) && (val < 66)) +else if ((val >= 33) && (val < 66)) edje_object_signal_emit(mixer->base, "medium", ""); -else if (val > 66) +else if (val >= 66) edje_object_signal_emit(mixer->base, "high", ""); } } @@ -683,10 +683,10 @@ e_box_orientation_set(win->vbox, 0); win->slider = e_slider_add(win->window->evas); -e_slider_value_range_set(win->slider, 0.0, 1.0); +e_slider_value_range_set(win->slider, 0.0, 100.0); e_slider_orientation_set(win->slider, 0); /* TODO: Fix this in e_slider... */ -//e_slider_direction_set(win->slider, 1); +//e_slider_direction_set(win->slider, 1); evas_object_show(win->slider); e_slider_min_size_get(win->slider, &mw, &mh); e_box_pack_start(win->vbox, win->slider); @@ -750,22 +750,22 @@ if (inst->mixer->mix_sys->get_volume) { int vol; -double v; - - if ((inst->ci->card_id != 0) && (inst->ci->channel_id != 0)) +//double v; + + if (inst->ci->channel_id != 0) { edje_object_signal_emit(e_slider_edje_object_get(win->slider), "e,state,enabled", "e"); vol = inst->mixer->mix_sys->get_volume(inst->ci->card_id, inst->ci->channel_id); -v = (1.0 - ((double)vol / 100)); -e_slider_value_set(win->slider, v); +// v = (1.0 - ((double)vol / 100)); +e_slider_value_set(win->slider, vol); if (vol < 33) edje_object_signal_emit(inst->mixer->base, "low", ""); -else if ((vol >= 34) && (vol < 66)) +else if ((vol >= 33) && (vol < 66)) edje_object_signal_emit(inst->mixer->base, "medium", ""); -else if (vol > 66) +else if (vol >= 66) edje_object_signal_emit(inst->mixer->base, "high", ""); - + if (inst->mixer->mix_sys->get_mute) { int m; @@ -942,8 +942,8 @@ if (!(mixer = win->mixer)) return; if (!mixer->mix_sys) return; if (!mixer->mix_sys->set_volume) return; - - val = ((1.0 - (e_slider_value_get(obj))) * 100); + + val = e_slider_value_get(obj); _mixer_simple_volume_change(mixer, mixer->inst->ci, val); } - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c e_mod_main.c Log Message: Lots of formatting fixes. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- alsa_mixer.c22 Dec 2007 18:00:15 - 1.38 +++ alsa_mixer.c22 Dec 2007 20:33:03 - 1.39 @@ -17,11 +17,11 @@ Evas_List * alsa_get_cards() { - Evas_List *cards = NULL; - snd_ctl_t *control; + Evas_List *cards = NULL; + snd_ctl_t *control; snd_ctl_card_info_t *hw_info; - int err, i; - char buf[1024]; + int err, i; + char buf[1024]; snd_ctl_card_info_alloca(&hw_info); @@ -54,26 +54,23 @@ alsa_free_cards(void *data) { Evas_List *cards; - - cards = data; - if (!cards) return; - + + if (!(cards = data)) return; while (cards) { Mixer_Card *card; - - card = cards->data; - if (!card) continue; + + if (!(card = cards->data)) return; if (card->name) evas_stringshare_del(card->name); if (card->real) evas_stringshare_del(card->real); while (card->channels) { Mixer_Channel *chan; - -chan = card->channels->data; -if (!chan) continue; + +if (!(chan = card->channels->data)) continue; if (chan->name) evas_stringshare_del(chan->name); -card->channels = evas_list_remove_list(card->channels, card->channels); +card->channels = + evas_list_remove_list(card->channels, card->channels); E_FREE(chan); } cards = evas_list_remove_list(cards, cards); @@ -84,13 +81,13 @@ void * alsa_get_card(int id) { - Evas_List *cards = NULL; - snd_mixer_t *handle; - snd_ctl_t *control; + Evas_List *cards = NULL; + snd_mixer_t *handle; + snd_ctl_t *control; snd_ctl_card_info_t *hw_info; - int err, i, cid; - char buf[1024]; - const char *name; + int err, i, cid; + char buf[1024]; + const char *name; for (i = 0; i < 32; i++) { @@ -128,30 +125,24 @@ Evas_List * alsa_card_get_channels(void *data) { - Mixer_Card *card; - Evas_List*channels; - - snd_mixer_t *handle; - snd_ctl_t*control; - snd_ctl_card_info_t *hw_info; + Mixer_Card *card; + Evas_List *channels = NULL; + snd_mixer_t *handle; + snd_ctl_t *control; + snd_ctl_card_info_t *hw_info; snd_mixer_selem_id_t *sid; - snd_mixer_elem_t *elem; - int err, i; + snd_mixer_elem_t *elem; + int err, i; - card = data; - if (!card) return NULL; - - channels = NULL; - + if (!(card = data)) return NULL; snd_mixer_selem_id_alloca(&sid); snd_ctl_card_info_alloca(&hw_info); - + if ((err = snd_ctl_open(&control, card->name, 0)) < 0) { printf("Cannot Open Card: %s %s\n", card->name, snd_strerror(err)); return NULL; } - if ((err = snd_ctl_card_info(control, hw_info)) < 0) { printf("Cannot get hardware info: %s %s\n", card->name, @@ -159,7 +150,6 @@ snd_ctl_close(control); return NULL; } - snd_ctl_close(control); if ((err = snd_mixer_open(&handle, 0)) < 0) @@ -167,21 +157,18 @@ printf("Cannot Open Mixer: %s\n", snd_strerror(err)); return NULL; } - if ((err = snd_mixer_attach(handle, card->name)) < 0) { printf("Cannot Attach Mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); return NULL; } - if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { printf("Cannot Register Mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); return NULL; } - if ((err = snd_mixer_load(handle)) < 0) { printf("Cannot Load Mixer: %s\n", snd_strerror(err)); @@ -214,12 +201,10 @@ void * alsa_card_get_channel(void *data, int channel_id) { - Mixer_Card*card; + Mixer_Card *card; Mixer_Channel *chan; - - card = data; - if (!card) return NULL; + if (!(card = data)) return NULL; chan = _alsa_card_get_channel(card, channel_id); if (!chan) return NULL; @@ -229,12 +214,12 @@ int alsa_get_volume(int card_id, int channel_id) { - Mixer_Card *card; - snd_mixer_t *handle; + Mixer_Card *card; + snd_mixer_t *handle; snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - int err, range, ret = 0, mute; - long min, max, vol; + int err, range, ret = 0, mute; + long min, max, vol; if (muted) { @@ -252,21 +237,18 @@ printf(
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Fix formatting. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- alsa_mixer.c22 Dec 2007 16:10:19 - 1.36 +++ alsa_mixer.c22 Dec 2007 16:13:14 - 1.37 @@ -469,10 +469,11 @@ id = _alsa_get_mixer_id(name); if (id == channel_id) { -if (snd_mixer_selem_has_playback_switch(elem)) { - snd_mixer_selem_set_playback_switch(elem, id, (mute == 1 ? 0: 1)); - muted = mute; -} +if (snd_mixer_selem_has_playback_switch(elem)) + { + snd_mixer_selem_set_playback_switch(elem, id, (mute == 1 ? 0: 1)); + muted = mute; + } else { /*Create hash to store combos. Could possibly be changed to a single int, - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Support using E's current theme for the mixer module (if included). === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -3 -r1.73 -r1.74 --- e_mod_main.c14 Dec 2007 03:25:16 - 1.73 +++ e_mod_main.c14 Dec 2007 03:38:55 - 1.74 @@ -95,7 +95,9 @@ e_module_dir_get(mixer_config->module)); mixer->base = edje_object_add(gc->evas); - edje_object_file_set(mixer->base, buf, "e/modules/mixer/main"); + if (!e_theme_edje_object_set(mixer->base, "base/theme/modules/mixer", + "e/modules/mixer/main")) + edje_object_file_set(mixer->base, buf, "e/modules/mixer/main"); evas_object_show(mixer->base); edje_object_signal_emit(mixer->base, "low", ""); - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c e_mod_main.c Log Message: Fix up some formatting issues; Fix issues with muting channels that do not support mute. Will restore old volume now. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- alsa_mixer.c12 Dec 2007 23:24:14 - 1.34 +++ alsa_mixer.c14 Dec 2007 03:25:16 - 1.35 @@ -11,6 +11,9 @@ static int _alsa_get_mixer_id (const char *name); static void *_alsa_card_get_channel (void *data, int channel_id); +static Ecore_Hash *vols = NULL; +static int muted = 0; + Evas_List * alsa_get_cards() { @@ -230,8 +233,16 @@ snd_mixer_t *handle; snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - int err, range, ret = 0; + int err, range, ret = 0, mute; long min, max, vol; + + if (muted) + { + int v; + + if (v = (unsigned int)(ecore_hash_get(vols, (int*)(card_id << 16) + channel_id))) + return v; + } card = alsa_get_card(card_id); if (!card) return 0; @@ -292,10 +303,14 @@ } snd_mixer_close(handle); + if (card->name) evas_stringshare_del(card->name); + if (card->real) evas_stringshare_del(card->real); E_FREE(card); return ret; error: + if (card->name) evas_stringshare_del(card->name); + if (card->real) evas_stringshare_del(card->real); E_FREE(card); return 0; } @@ -362,7 +377,6 @@ snd_mixer_close(handle); goto error; } - snd_mixer_selem_get_playback_volume_range(elem, &min, &max); v = (vol < 0) ? -vol: vol; if (v > 0) @@ -380,96 +394,29 @@ snd_mixer_selem_set_playback_volume(elem, 0, v); if (!snd_mixer_selem_is_playback_mono(elem)) snd_mixer_selem_set_playback_volume(elem, 1, v); - + break; } } } - + snd_mixer_close(handle); + if (card->name) evas_stringshare_del(card->name); + if (card->real) evas_stringshare_del(card->real); E_FREE(card); return 1; error: -E_FREE(card); -return 0; + if (card->name) evas_stringshare_del(card->name); + if (card->real) evas_stringshare_del(card->real); + E_FREE(card); + return 0; } int alsa_get_mute(int card_id, int channel_id) { - Mixer_Card *card; - snd_mixer_t *handle; - snd_mixer_elem_t *elem; - snd_mixer_selem_id_t *sid; - int err, id, mute = 0; - const char *name; - - card = alsa_get_card(card_id); - if (!card) return 0; - - if ((err = snd_mixer_open(&handle, 0)) < 0) - { - printf("Cannot open mixer: %s\n", snd_strerror(err)); -goto error; - } - - if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) - { - printf("Cannot Attach Mixer: %s\n", snd_strerror(err)); - snd_mixer_close(handle); -goto error; - } - - if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) - { - printf("Cannot Register Mixer: %s\n", snd_strerror(err)); - snd_mixer_close(handle); -goto error; - } - - if ((err = snd_mixer_load(handle)) < 0) - { - printf("Cannot Load Mixer: %s\n", snd_strerror(err)); - snd_mixer_close(handle); -goto error; - } - - for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) - { - snd_mixer_selem_id_alloca(&sid); - snd_mixer_selem_get_id(elem, sid); - if (!snd_mixer_selem_is_active(elem)) continue; - - name = snd_mixer_selem_id_get_name(sid); - id = _alsa_get_mixer_id(name); - if (id == channel_id) - { -if (snd_mixer_selem_has_playback_switch(elem)) - { - snd_mixer_selem_get_playback_switch(elem, id, &mute); - break; - } -else - { - snd_mixer_close(handle); - mute = alsa_get_volume(card_id, channel_id); - E_FREE(card); - if (mute <= 0) - return 1; - else - return 0; - } - } - } - - snd_mixer_close(handle); - E_FREE(card); - return (mute == 1 ? 0: 1); - -error: - E_FREE(card); - return 0; + return muted; } int @@ -481,7 +428,6 @@ snd_mixer_selem_id_t *sid; int id, err, vol; const char *name; - static Ecore_Hash*vols = NULL; card = alsa_get_card(card_id); if (!card) return 0; @@
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c alsa_mixer.c Log Message: Allow setting any channel. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- e_mod_config.c 19 Nov 2007 11:04:59 - 1.23 +++ e_mod_config.c 12 Dec 2007 23:24:14 - 1.24 @@ -96,6 +96,7 @@ Config_Item *ci; E_Radio_Group *cg, *mg; Mixer_Card*card; + int i = 0; ci = cfd->data; @@ -137,16 +138,22 @@ card->channels = mixer->mix_sys->get_channels(card); if (card->channels) { - of = e_widget_framelist_add(evas, D_("Available Mixers"), 0); + of = e_widget_frametable_add(evas, D_("Available Mixers"), 0); mg = e_widget_radio_group_new(&cfdata->channel_id); - for (chans = card->channels; chans; chans = chans->next) + for (i = 0, chans = card->channels; chans; chans = chans->next, i++) { Mixer_Channel *chan; chan = chans->data; if (!chan) continue; - ob = e_widget_radio_add(evas, (char *)chan->name, chan->id, mg); - e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, (char *)chan->name, + chan->id, mg); + if (!(i % 2)) +e_widget_frametable_object_append(of, ob, 0, i, 1, 1, + 1, 0, 1, 0); + else +e_widget_frametable_object_append(of, ob, 1, (i - 1), 1, 1, + 1, 0, 1, 0); } e_widget_list_object_append(o, of, 1, 1, 0.5); } === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- alsa_mixer.c20 Nov 2007 21:03:57 - 1.33 +++ alsa_mixer.c12 Dec 2007 23:24:14 - 1.34 @@ -197,17 +197,11 @@ const char *name; name = snd_mixer_selem_id_get_name(sid); -if ((!strcmp(name, "Master")) || (!strcmp(name, "PCM")) || -(!strcmp(name, "DAC")) || (!strcmp(name, "Wave"))) - { - ac = E_NEW(Mixer_Channel, 1); - if (!ac) continue; - - ac->name = evas_stringshare_add(name); - ac->id = _alsa_get_mixer_id(ac->name); - - channels = evas_list_append(channels, ac); - } +ac = E_NEW(Mixer_Channel, 1); +if (!ac) continue; +ac->name = evas_stringshare_add(name); +ac->id = _alsa_get_mixer_id(ac->name); +channels = evas_list_append(channels, ac); } } snd_mixer_close(handle); - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.h e_mod_main.c Log Message: Fix for gadcon menu breakage. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- e_mod_main.h31 Oct 2007 14:11:55 - 1.11 +++ e_mod_main.h25 Nov 2007 05:37:18 - 1.12 @@ -10,7 +10,6 @@ { E_Module*module; E_Config_Dialog *config_dialog; - E_Menu *menu; Evas_List *instances; Evas_List *items; === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -3 -r1.70 -r1.71 --- e_mod_main.c20 Nov 2007 03:35:49 - 1.70 +++ e_mod_main.c25 Nov 2007 05:37:18 - 1.71 @@ -33,7 +33,6 @@ static void _mixer_mute_toggle (Mixer *mixer, Config_Item *ci, int channel_id); static Config_Item *_mixer_config_item_get (void *data, const char *id); -static void _mixer_menu_cb_post (void *data, E_Menu *m); static void _mixer_menu_cb_configure (void *data, E_Menu *m, E_Menu_Item *mi); static void _mixer_cb_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info); static void _mixer_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info); @@ -255,7 +254,7 @@ if (!inst) return; ev = event_info; - if ((ev->button == 3) && (!mixer_config->menu)) + if ((ev->button == 3) && (!inst->gcc->menu)) { E_Menu *mn; E_Menu_Item *mi; @@ -265,8 +264,6 @@ zone = e_util_zone_current_get(e_manager_current_get()); mn = e_menu_new(); - e_menu_post_deactivate_callback_set(mn, _mixer_menu_cb_post, inst); - mixer_config->menu = mn; mi = e_menu_item_new(mn); e_menu_item_label_set(mi, D_("Configuration")); @@ -317,14 +314,6 @@ } static void -_mixer_menu_cb_post(void *data, E_Menu *m) -{ - if (!mixer_config->menu) return; - e_object_del(E_OBJECT(mixer_config->menu)); - mixer_config->menu = NULL; -} - -static void _mixer_menu_cb_configure(void *data, E_Menu *m, E_Menu_Item *mi) { Instance*inst; @@ -555,13 +544,6 @@ if (mixer_config->config_dialog) e_object_del(E_OBJECT(mixer_config->config_dialog)); - - if (mixer_config->menu) - { - e_menu_post_deactivate_callback_set(mixer_config->menu, NULL, NULL); - e_object_del(E_OBJECT(mixer_config->menu)); - mixer_config->menu = NULL; - } while (mixer_config->items) { - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Couple more formatting fixes I missed. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- alsa_mixer.c20 Nov 2007 17:22:28 - 1.32 +++ alsa_mixer.c20 Nov 2007 21:03:57 - 1.33 @@ -545,15 +545,15 @@ snd_mixer_close(handle); if (mute) { - ecore_hash_set(vols, (int*)(card_id<<16) + channel_id, (int*)alsa_get_volume(card_id,channel_id)); + ecore_hash_set(vols, (int*)(card_id << 16) + channel_id, (int*)alsa_get_volume(card_id, channel_id)); alsa_set_volume(card_id, channel_id, (0.0 * 100)); } else { - if (vol = (unsigned int)(ecore_hash_get(vols, (int*)(card_id<<16) + channel_id))) + if (vol = (unsigned int)(ecore_hash_get(vols, (int*)(card_id << 16) + channel_id))) { alsa_set_volume(card_id, channel_id, vol); - ecore_hash_remove(vols, (int*)(card_id<<16) + channel_id); + ecore_hash_remove(vols, (int*)(card_id << 16) + channel_id); } else alsa_set_volume(card_id, channel_id, (0.5 * 100)); - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Fix formatting. No need to open the mixer handle when getting cards list. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- alsa_mixer.c20 Nov 2007 11:12:53 - 1.31 +++ alsa_mixer.c20 Nov 2007 17:22:28 - 1.32 @@ -15,7 +15,6 @@ alsa_get_cards() { Evas_List *cards = NULL; - snd_mixer_t *handle; snd_ctl_t *control; snd_ctl_card_info_t *hw_info; int err, i; @@ -38,30 +37,11 @@ } snd_ctl_close(control); - if ((err = snd_mixer_open(&handle, 0)) < 0) - { -printf("Cannot open mixer: %s\n", snd_strerror(err)); -continue; - } - if ((err = snd_mixer_attach(handle, buf)) < 0) - { -printf("Cannot attach mixer: %s\n", snd_strerror(err)); -snd_mixer_close(handle); -continue; - } - if ((err = snd_mixer_detach(handle, buf)) < 0) - { -printf("Cannot detach mixer: %s\n", snd_strerror(err)); -snd_mixer_close(handle); -continue; - } - card = E_NEW(Mixer_Card, 1); if (!card) continue; card->name = evas_stringshare_add(buf); card->real = evas_stringshare_add(snd_ctl_card_info_get_name(hw_info)); card->id = _alsa_get_card_id(card->real); - snd_mixer_close(handle); cards = evas_list_append(cards, card); } return cards; @@ -554,29 +534,29 @@ else { /*Create hash to store combos. Could possibly be changed to a single int, -but this should allow to easily support multiple mixers later.*/ + but this should allow to easily support multiple mixers later.*/ if (!vols) { - vols = ecore_hash_new(ecore_direct_hash,ecore_direct_compare); + vols = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); ecore_hash_free_key_cb_set(vols, NULL); ecore_hash_free_value_cb_set(vols, NULL); } snd_mixer_close(handle); if (mute) - { - ecore_hash_set(vols, (int*)(card_id<<16)+channel_id, (int*)alsa_get_volume(card_id,channel_id)); + { + ecore_hash_set(vols, (int*)(card_id<<16) + channel_id, (int*)alsa_get_volume(card_id,channel_id)); alsa_set_volume(card_id, channel_id, (0.0 * 100)); } else - { - if (vol = (unsigned int)(ecore_hash_get(vols, (int*)(card_id<<16)+channel_id))) - { -alsa_set_volume(card_id, channel_id, vol); -ecore_hash_remove(vols, (int*)(card_id<<16)+channel_id); - } -else - alsa_set_volume(card_id, channel_id, (0.5 * 100)); + { + if (vol = (unsigned int)(ecore_hash_get(vols, (int*)(card_id<<16) + channel_id))) +{ + alsa_set_volume(card_id, channel_id, vol); + ecore_hash_remove(vols, (int*)(card_id<<16) + channel_id); +} + else +alsa_set_volume(card_id, channel_id, (0.5 * 100)); } E_FREE(card); return 1; - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: configure.in Log Message: Let user know the correct install path. === RCS file: /cvs/e/e_modules/mixer/configure.in,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- configure.in20 Nov 2007 06:23:46 - 1.21 +++ configure.in20 Nov 2007 17:21:13 - 1.22 @@ -152,7 +152,7 @@ echo echo "Configuration:" echo -echo " Install path: ${prefix}" +echo " Install path: ${datadir}" echo echo " Audio Subsystems" echo " " - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Fix up mixer config to allow selecting a card & channels. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -3 -r1.69 -r1.70 --- e_mod_main.c19 Nov 2007 11:04:59 - 1.69 +++ e_mod_main.c20 Nov 2007 03:35:49 - 1.70 @@ -190,10 +190,21 @@ static const char * _gc_id_new(void) { + int num = 0; + char buf[128]; Config_Item *ci; - ci = _mixer_config_item_get(NULL, NULL); - return ci->id; + /* Create id */ + if (mixer_config->items) + { + const char *p; + + ci = evas_list_last(mixer_config->items)->data; + p = strrchr(ci->id, '.'); + if (p) num = atoi(p + 1) + 1; + } + snprintf(buf, sizeof(buf), "%s.%d", _gc_class.name, num); + return strdup(buf); } void @@ -331,33 +342,13 @@ Mixer_Channel *chan; Evas_List *l; Config_Item *ci; - char buf[128]; mixer = data; - - if (!id) - { - int num = 0; - - /* Create id */ - if (mixer_config->items) - { -const char *p; -ci = evas_list_last(mixer_config->items)->data; -p = strrchr(ci->id, '.'); -if (p) num = atoi(p + 1) + 1; - } - snprintf(buf, sizeof(buf), "%s.%d", _gc_class.name, num); - id = buf; - } - else + for (l = mixer_config->items; l; l = l->next) { - for (l = mixer_config->items; l; l = l->next) - { -ci = l->data; -if (!ci->id) continue; -if (!strcmp(ci->id, id)) return ci; - } + ci = l->data; + if (!ci->id) continue; + if (!strcmp(ci->id, id)) return ci; } ci = E_NEW(Config_Item, 1); - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c alsa_mixer.c e_mod_config.c Log Message: Fixes for config of mixer module. If you are having issues w/ this module, remove any old module.cfg first. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -3 -r1.68 -r1.69 --- e_mod_main.c12 Nov 2007 07:48:31 - 1.68 +++ e_mod_main.c19 Nov 2007 11:04:59 - 1.69 @@ -385,8 +385,8 @@ return ci; } } - - card = mixer->mix_sys->cards->data; + + card = evas_list_nth(mixer->mix_sys->cards, 0); if (!card) { ci->card_id = 0; @@ -405,8 +405,8 @@ card->channels = mixer->mix_sys->get_channels(card); } if (card->channels) - { - chan = card->channels->data; + { + chan = evas_list_nth(card->channels, 0); ci->channel_id = chan->id; } else === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- alsa_mixer.c19 Nov 2007 08:47:35 - 1.28 +++ alsa_mixer.c19 Nov 2007 11:04:59 - 1.29 @@ -105,15 +105,16 @@ snd_mixer_t *handle; snd_ctl_t *control; snd_ctl_card_info_t *hw_info; - int err, i; + int err, i, cid; char buf[1024]; - -snd_ctl_card_info_alloca(&hw_info); + const char *name; for (i = 0; i < 32; i++) { Mixer_Card *card; - + + snd_ctl_card_info_alloca(&hw_info); + snprintf(buf, sizeof(buf), "hw:%d", i); if ((err = snd_ctl_open(&control, buf, 0)) < 0) break; if ((err = snd_ctl_card_info(control, hw_info)) < 0) @@ -125,33 +126,16 @@ } snd_ctl_close(control); - if ((err = snd_mixer_open(&handle, 0)) < 0) - { -printf("Cannot open mixer: %s\n", snd_strerror(err)); -continue; - } - if ((err = snd_mixer_attach(handle, buf)) < 0) - { -printf("Cannot attach mixer: %s\n", snd_strerror(err)); -snd_mixer_close(handle); -continue; - } - if ((err = snd_mixer_detach(handle, buf)) < 0) - { -printf("Cannot detach mixer: %s\n", snd_strerror(err)); -snd_mixer_close(handle); -continue; - } - snd_mixer_close(handle); + + name = snd_ctl_card_info_get_name(hw_info); + cid = _alsa_get_card_id(name); + if (cid != id) continue; card = E_NEW(Mixer_Card, 1); if (!card) continue; card->name = evas_stringshare_add(buf); - card->real = evas_stringshare_add(snd_ctl_card_info_get_name(hw_info)); - card->id = _alsa_get_card_id(card->real); - - if (!_alsa_get_card_id(card->real) == id) continue; - + card->real = evas_stringshare_add(name); + card->id = cid; card->channels = alsa_card_get_channels(card); return card; } === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- e_mod_config.c 31 Oct 2007 14:11:55 - 1.22 +++ e_mod_config.c 19 Nov 2007 11:04:59 - 1.23 @@ -83,6 +83,7 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { if (!mixer_config) return; + if (cfdata->app) free(cfdata->app); mixer_config->config_dialog = NULL; E_FREE(cfdata); } @@ -113,8 +114,8 @@ if (mixer->mix_sys->get_cards) mixer->mix_sys->cards = mixer->mix_sys->get_cards(); } - - if ((mixer->mix_sys->cards) && (evas_list_count(mixer->mix_sys->cards) > 1)) + + if (mixer->mix_sys->cards) { of = e_widget_framelist_add(evas, D_("Available Cards"), 0); cg = e_widget_radio_group_new(&cfdata->card_id); @@ -127,8 +128,8 @@ } e_widget_list_object_append(o, of, 1, 1, 0.5); } - - if ((mixer->mix_sys->get_card) && (ci->card_id != 0)) + + if (mixer->mix_sys->get_card) { card = mixer->mix_sys->get_card(ci->card_id); if ((mixer->mix_sys->get_channels) && (card)) - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-cvs mailing
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Not sure why, but this actually works again (using alsa-lib-1.0.14). Minor formatting fixes. Fixup error printfs. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- alsa_mixer.c12 Nov 2007 17:58:01 - 1.27 +++ alsa_mixer.c19 Nov 2007 08:47:35 - 1.28 @@ -28,11 +28,7 @@ Mixer_Card *card; snprintf(buf, sizeof(buf), "hw:%d", i); - if ((err = snd_ctl_open(&control, buf, 0)) < 0) - { -// printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); -break; - } + if ((err = snd_ctl_open(&control, buf, 0)) < 0) break; if ((err = snd_ctl_card_info(control, hw_info)) < 0) { printf("Cannot get hardware info: %s: %s\n", buf, @@ -44,18 +40,18 @@ snd_ctl_close(control); if ((err = snd_mixer_open(&handle, 0)) < 0) { -printf("Cannot open mixer\n"); +printf("Cannot open mixer: %s\n", snd_strerror(err)); continue; } if ((err = snd_mixer_attach(handle, buf)) < 0) { -printf("Cannot attach mixer\n"); +printf("Cannot attach mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); continue; } if ((err = snd_mixer_detach(handle, buf)) < 0) { -printf("Cannot detach mixer\n"); +printf("Cannot detach mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); continue; } @@ -119,11 +115,7 @@ Mixer_Card *card; snprintf(buf, sizeof(buf), "hw:%d", i); - if ((err = snd_ctl_open(&control, buf, 0)) < 0) - { -// printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); -break; - } + if ((err = snd_ctl_open(&control, buf, 0)) < 0) break; if ((err = snd_ctl_card_info(control, hw_info)) < 0) { printf("Cannot get hardware info: %s: %s\n", buf, @@ -135,18 +127,18 @@ snd_ctl_close(control); if ((err = snd_mixer_open(&handle, 0)) < 0) { -printf("Cannot open mixer\n"); +printf("Cannot open mixer: %s\n", snd_strerror(err)); continue; } if ((err = snd_mixer_attach(handle, buf)) < 0) { -printf("Cannot attach mixer\n"); +printf("Cannot attach mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); continue; } if ((err = snd_mixer_detach(handle, buf)) < 0) { -printf("Cannot detach mixer\n"); +printf("Cannot detach mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); continue; } @@ -163,8 +155,6 @@ card->channels = alsa_card_get_channels(card); return card; } - //snd_ctl_close(control); -// snd_mixer_close(handle); return NULL; } @@ -191,13 +181,14 @@ if ((err = snd_ctl_open(&control, card->name, 0)) < 0) { - printf("\n\nCannot Open Card: %s %s\n\n", card->name, snd_strerror(err)); + printf("Cannot Open Card: %s %s\n", card->name, snd_strerror(err)); return NULL; } if ((err = snd_ctl_card_info(control, hw_info)) < 0) - { - printf("\n\nCannot get hardware info: %s %s\n\n", card->name, snd_strerror(err)); + { + printf("Cannot get hardware info: %s %s\n", card->name, + snd_strerror(err)); snd_ctl_close(control); return NULL; } @@ -206,27 +197,27 @@ if ((err = snd_mixer_open(&handle, 0)) < 0) { - printf("\n\nCannot Open Mixer: %s\n\n", snd_strerror(err)); + printf("Cannot Open Mixer: %s\n", snd_strerror(err)); return NULL; } if ((err = snd_mixer_attach(handle, card->name)) < 0) { - printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); + printf("Cannot Attach Mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); return NULL; } if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { - printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); + printf("Cannot Register Mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); return NULL; } if ((err = snd_mixer_load(handle)) < 0) { - printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); + printf("Cannot Load Mixer: %s\n", snd_strerror(err)); snd_mixer_close(handle); return NULL; } @@ -242,10 +233,8 @@ const char *name;
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Stop mixer module from segfaulting w/ recent alsa. Really this code all needs to be redone, just no time :( === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- alsa_mixer.c19 Sep 2007 01:40:09 - 1.26 +++ alsa_mixer.c12 Nov 2007 17:58:01 - 1.27 @@ -20,12 +20,6 @@ snd_ctl_card_info_t *hw_info; int err, i; char buf[1024]; - - if ((err = snd_mixer_open(&handle, 0)) < 0) - { - printf("Cannot open mixer: %s\n", snd_strerror(err)); - return NULL; - } snd_ctl_card_info_alloca(&hw_info); @@ -34,16 +28,10 @@ Mixer_Card *card; snprintf(buf, sizeof(buf), "hw:%d", i); - if ((err = snd_mixer_attach(handle, buf)) < 0) break; - if ((err = snd_mixer_detach(handle, buf)) < 0) - { -snd_mixer_close(handle); -break; - } if ((err = snd_ctl_open(&control, buf, 0)) < 0) { -printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); -continue; +// printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); +break; } if ((err = snd_ctl_card_info(control, hw_info)) < 0) { @@ -54,16 +42,32 @@ } snd_ctl_close(control); - + if ((err = snd_mixer_open(&handle, 0)) < 0) + { +printf("Cannot open mixer\n"); +continue; + } + if ((err = snd_mixer_attach(handle, buf)) < 0) + { +printf("Cannot attach mixer\n"); +snd_mixer_close(handle); +continue; + } + if ((err = snd_mixer_detach(handle, buf)) < 0) + { +printf("Cannot detach mixer\n"); +snd_mixer_close(handle); +continue; + } + card = E_NEW(Mixer_Card, 1); if (!card) continue; card->name = evas_stringshare_add(buf); card->real = evas_stringshare_add(snd_ctl_card_info_get_name(hw_info)); card->id = _alsa_get_card_id(card->real); - + snd_mixer_close(handle); cards = evas_list_append(cards, card); } - snd_mixer_close(handle); return cards; } @@ -108,40 +112,44 @@ int err, i; char buf[1024]; - if ((err = snd_mixer_open(&handle, 0)) < 0) - { - printf("Cannot open mixer: %s\n", snd_strerror(err)); - return NULL; - } - - snd_ctl_card_info_alloca(&hw_info); +snd_ctl_card_info_alloca(&hw_info); for (i = 0; i < 32; i++) { Mixer_Card *card; snprintf(buf, sizeof(buf), "hw:%d", i); - if ((err = snd_mixer_attach(handle, buf)) < 0) break; - if ((err = snd_mixer_detach(handle, buf)) < 0) + if ((err = snd_ctl_open(&control, buf, 0)) < 0) { -snd_mixer_close(handle); +// printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); +break; + } + if ((err = snd_ctl_card_info(control, hw_info)) < 0) + { +printf("Cannot get hardware info: %s: %s\n", buf, + snd_strerror(err)); +snd_ctl_close(control); continue; } - if ((err = snd_ctl_open(&control, buf, 0)) < 0) + + snd_ctl_close(control); + if ((err = snd_mixer_open(&handle, 0)) < 0) + { +printf("Cannot open mixer\n"); +continue; + } + if ((err = snd_mixer_attach(handle, buf)) < 0) { -printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); +printf("Cannot attach mixer\n"); snd_mixer_close(handle); continue; } - if ((err = snd_ctl_card_info(control, hw_info)) < 0) + if ((err = snd_mixer_detach(handle, buf)) < 0) { -printf("Cannot get hardware info: %s: %s\n", buf, snd_strerror(err)); -snd_ctl_close(control); +printf("Cannot detach mixer\n"); snd_mixer_close(handle); continue; } - - snd_ctl_close(control); snd_mixer_close(handle); card = E_NEW(Mixer_Card, 1); @@ -156,7 +164,7 @@ return card; } //snd_ctl_close(control); - snd_mixer_close(handle); +// snd_mixer_close(handle); return NULL; } - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FR
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c e_mod_main.c e_mod_main.h Log Message: Fix mixer for api breakage. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- e_mod_config.c 7 Oct 2007 21:26:48 - 1.21 +++ e_mod_config.c 31 Oct 2007 14:11:55 - 1.22 @@ -45,7 +45,7 @@ v->advanced.apply_cfdata = NULL; v->advanced.create_widgets = NULL; - snprintf(buf, sizeof(buf), "%s/module.edj", + snprintf(buf, sizeof(buf), "%s/e-module-mixer.edj", e_module_dir_get(mixer_config->module)); con = e_container_current_get(e_manager_current_get()); === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -3 -r1.65 -r1.66 --- e_mod_main.c16 Sep 2007 03:31:41 - 1.65 +++ e_mod_main.c31 Oct 2007 14:11:55 - 1.66 @@ -594,14 +594,6 @@ return 1; } -EAPI int -e_modapi_about(E_Module *m) -{ - e_module_dialog_show(m, D_("Mixer"), - D_("Mixer module lets you change volume.")); - return 1; -} - /* Changes the volume for the main channel*/ static void _mixer_simple_volume_change(Mixer *mixer, Config_Item *ci, double val) === RCS file: /cvs/e/e_modules/mixer/e_mod_main.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- e_mod_main.h21 Jan 2007 08:57:12 - 1.10 +++ e_mod_main.h31 Oct 2007 14:11:55 - 1.11 @@ -39,7 +39,6 @@ EAPI void *e_modapi_init (E_Module *m); EAPI int e_modapi_shutdown (E_Module *m); EAPI int e_modapi_save (E_Module *m); -EAPI int e_modapi_about(E_Module *m); void _config_mixer_module(void *data, Config_Item *ci); - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: configure.in Log Message: Pretty standard patch set from Lutin for recent pkg-config changes in EFL... committing in bulk. === RCS file: /cvs/e/e_modules/mixer/configure.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- configure.in25 Mar 2007 01:43:16 - 1.13 +++ configure.in25 Apr 2007 09:22:07 - 1.14 @@ -108,22 +108,9 @@ #AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl) #AC_SUBST(dlopen_libs) -AC_ARG_WITH(edje-config, -[ --with-edje-config=EDJE_CONFIG use edje-config specified ], -[ - EDJE_CONFIG=$withval; - echo "using "$EDJE_CONFIG" for edje-config"; -/ -],[ - PROG="edje-config"; - AC_PATH_PROG(EDJE_CONFIG, $PROG, "", $PATH) -]) -edje_cflags=`$EDJE_CONFIG --cflags` -edje_libs=`$EDJE_CONFIG --libs` -AC_SUBST(edje_cflags) -AC_SUBST(edje_libs) +PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0]) -edje_cc="`$EDJE_CONFIG --prefix`/bin/edje_cc" +edje_cc="$(pkg-config --variable=prefix edje)/bin/edje_cc" AC_ARG_WITH(edje-cc, [ --with-edje-cc=PATH specify a specific path to edje_cc], [ @@ -131,7 +118,7 @@ edje_cc=$v echo " Enlightenment edje_cc explicitly set to "$edje_cc; ],[ - edje_cc="`$EDJE_CONFIG --prefix`/bin/edje_cc" + edje_cc="$(pkg-config --variable=prefix edje)/bin/edje_cc" ]) AC_SUBST(edje_cc) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: autogen.sh Log Message: Add autopoint for mixer module. === RCS file: /cvs/e/e_modules/mixer/autogen.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- autogen.sh 12 Oct 2006 18:29:04 - 1.2 +++ autogen.sh 31 Mar 2007 22:14:42 - 1.3 @@ -3,6 +3,7 @@ rm -rf autom4te.cache rm -f aclocal.m4 ltmain.sh +echo "Running autopoint..." ; autopoint -f || : echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1 echo "Running autoheader..." ; autoheader || exit 1 echo "Running autoconf..." ; autoconf || exit 1 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Patch from metrics for mem-leak fix. Thanks :) === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- alsa_mixer.c18 Sep 2006 11:03:31 - 1.24 +++ alsa_mixer.c17 Oct 2006 03:28:51 - 1.25 @@ -283,28 +283,28 @@ if ((err = snd_mixer_open(&handle, 0)) < 0) { printf("Cannot open mixer: %s\n", snd_strerror(err)); - return 0; +goto error; } if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) { printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } if ((err = snd_mixer_load(handle)) < 0) { printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) @@ -336,7 +336,12 @@ } snd_mixer_close(handle); + E_FREE(card); return ret; + +error: + E_FREE(card); + return 0; } int @@ -355,28 +360,28 @@ if ((err = snd_mixer_open(&handle, 0)) < 0) { printf("Cannot open mixer: %s\n", snd_strerror(err)); - return 0; +goto error; } if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) { printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } if ((err = snd_mixer_load(handle)) < 0) { printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) @@ -399,7 +404,7 @@ if (range == 0) { snd_mixer_close(handle); - return 0; + goto error; } snd_mixer_selem_get_playback_volume_range(elem, &min, &max); @@ -428,7 +433,12 @@ } snd_mixer_close(handle); + E_FREE(card); return 1; + +error: +E_FREE(card); +return 0; } int @@ -447,28 +457,28 @@ if ((err = snd_mixer_open(&handle, 0)) < 0) { printf("Cannot open mixer: %s\n", snd_strerror(err)); - return 0; +goto error; } if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) { printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } if ((err = snd_mixer_load(handle)) < 0) { printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) @@ -490,6 +500,7 @@ { snd_mixer_close(handle); mute = alsa_get_volume(card_id, channel_id); + E_FREE(card); if (mute <= 0) return 1; else @@ -499,7 +510,12 @@ } snd_mixer_close(handle); + E_FREE(card); return (mute == 1 ? 0: 1); + +error: + E_FREE(card); + return 0; } int @@ -518,28 +534,28 @@ if ((err = snd_mixer_open(&handle, 0)) < 0) { printf("Cannot open mixer: %s\n", snd_strerror(err)); - return 0; +goto error; } if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) { printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +goto error; } if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); snd_mixer_close(handle); - return 0; +
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Remove the app installed check for metrics so apps can be run with arguments. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -3 -r1.51 -r1.52 --- e_mod_main.c3 Oct 2006 04:38:58 - 1.51 +++ e_mod_main.c9 Oct 2006 05:01:31 - 1.52 @@ -222,8 +222,7 @@ } else if (ev->button == 2) { - if ((ci->use_app) && (ci->app != NULL) && - (ecore_file_app_installed(ci->app))) + if ((ci->use_app) && (ci->app != NULL)) ecore_exe_run(ci->app, NULL); else _mixer_window_simple_pop_up(inst); - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Add missing paren. Thanks _alexey_. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -3 -r1.50 -r1.51 --- e_mod_main.c3 Oct 2006 03:54:58 - 1.50 +++ e_mod_main.c3 Oct 2006 04:38:58 - 1.51 @@ -222,7 +222,8 @@ } else if (ev->button == 2) { - if ((ci->use_app) && (ci->app != NULL) && (ecore_file_app_installed(ci->app)) + if ((ci->use_app) && (ci->app != NULL) && + (ecore_file_app_installed(ci->app))) ecore_exe_run(ci->app, NULL); else _mixer_window_simple_pop_up(inst); - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Set config item "app" to use stringshare by default, and check that app is installed before trying to launch. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -3 -r1.49 -r1.50 --- e_mod_main.c3 Oct 2006 03:48:28 - 1.49 +++ e_mod_main.c3 Oct 2006 03:54:58 - 1.50 @@ -222,7 +222,7 @@ } else if (ev->button == 2) { - if ((ci->use_app) && (ci->app != NULL)) + if ((ci->use_app) && (ci->app != NULL) && (ecore_file_app_installed(ci->app)) ecore_exe_run(ci->app, NULL); else _mixer_window_simple_pop_up(inst); @@ -303,7 +303,7 @@ ci->card_id = 0; ci->channel_id = 0; ci->mode = SIMPLE_MODE; - ci->app = NULL; + ci->app = evas_stringshare_add(""); } else if (mixer->mix_sys) { @@ -316,7 +316,7 @@ ci->card_id = 0; ci->channel_id = 0; ci->mode = SIMPLE_MODE; - ci->app = NULL; + ci->app = evas_stringshare_add(""); mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; } @@ -328,7 +328,7 @@ ci->card_id = 0; ci->channel_id = 0; ci->mode = SIMPLE_MODE; -ci->app = NULL; +ci->app = evas_stringshare_add(""); mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; } @@ -445,7 +445,7 @@ ci->card_id = 0; ci->channel_id = 0; ci->mode = SIMPLE_MODE; - ci->app = NULL; + ci->app = evas_stringshare_add(""); ci->use_app = 0; mixer_config->items = evas_list_append(mixer_config->items, ci); } - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Use middle button for launching external apps, not for muting, that's why there is a mute check on the popup window. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -3 -r1.48 -r1.49 --- e_mod_main.c3 Oct 2006 03:39:15 - 1.48 +++ e_mod_main.c3 Oct 2006 03:48:28 - 1.49 @@ -221,19 +221,14 @@ EVAS_BUTTON_NONE, ev->timestamp, NULL); } else if (ev->button == 2) - _mixer_simple_mute_toggle(inst->mixer, ci); - else if (ev->button == 1) { - if (ev->flags == EVAS_BUTTON_DOUBLE_CLICK) - { -if ((ci->use_app) && (ci->app != NULL)) - ecore_exe_run(ci->app, NULL); -else - _mixer_window_simple_pop_up(inst); - } - else if (ev->flags == EVAS_BUTTON_NONE) - _mixer_window_simple_pop_up(inst); + if ((ci->use_app) && (ci->app != NULL)) + ecore_exe_run(ci->app, NULL); + else + _mixer_window_simple_pop_up(inst); } + else if (ev->button == 1) + _mixer_window_simple_pop_up(inst); } static void - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c e_mod_main.c e_mod_main.h Log Message: Highly modified patch from Janne Julkunen for launching an external mixer app. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- e_mod_config.c 12 Sep 2006 17:36:43 - 1.15 +++ e_mod_config.c 3 Oct 2006 03:39:15 - 1.16 @@ -2,8 +2,6 @@ #include "e_mod_main.h" #include "e_mod_types.h" -//#define DEBUG 1 - struct _E_Config_Dialog_Data { Evas_Object *list; @@ -11,6 +9,9 @@ int card_id; int channel_id; int mode; + + char *app; + int use_app; }; /* Protos */ @@ -28,7 +29,7 @@ E_Config_Dialog_View *v; E_Container *con; char buf[4096]; - + mixer = data; v = E_NEW(E_Config_Dialog_View, 1); @@ -38,7 +39,9 @@ v->free_cfdata = _free_data; v->basic.apply_cfdata = _basic_apply_data; v->basic.create_widgets = _basic_create_widgets; - + v->advanced.apply_cfdata = NULL; + v->advanced.create_widgets = NULL; + snprintf(buf, sizeof(buf), "%s/module.eap", e_module_dir_get(mixer_config->module)); @@ -54,6 +57,9 @@ cfdata->card_id = ci->card_id; cfdata->channel_id = ci->channel_id; cfdata->mode = ci->mode; + cfdata->use_app = ci->use_app; + if (ci->app != NULL) + cfdata->app = strdup(ci->app); } static void * @@ -79,7 +85,7 @@ static Evas_Object * _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) { - Evas_Object *o, *ob, *of; + Evas_Object *o, *ob, *of, *ot; Evas_List *cards, *chans; Config_Item *ci; E_Radio_Group *cg, *mg, *dg; @@ -88,17 +94,14 @@ ci = cfd->data; o = e_widget_list_add(evas, 0, 0); - #ifdef DEBUG - of = e_widget_framelist_add(evas, _("Display Mode"), 0); - dg = e_widget_radio_group_new(&cfdata->mode); - ob = e_widget_radio_add(evas, _("Simple Mode"), SIMPLE_MODE, dg); - e_widget_framelist_object_append(of, ob); - ob = e_widget_radio_add(evas, _("Full Mode"), FULL_MODE, dg); - e_widget_framelist_object_append(of, ob); - ob = e_widget_radio_add(evas, _("Shelf Mode"), ONEFANG_MODE, dg); - e_widget_framelist_object_append(of, ob); - e_widget_list_object_append(o, of, 1, 1, 0.5); - #endif + + ot = e_widget_frametable_add(evas, _("Mixer Application"), 1); + ob = e_widget_check_add(evas, _("Launch Mixer App"), &(cfdata->use_app)); + e_widget_frametable_object_append(ot, ob, 0, 0, 1, 1, 1, 0, 1, 0); + ob = e_widget_entry_add(evas, &cfdata->app); + e_widget_frametable_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0); + + e_widget_list_object_append(o, ot, 1, 1, 0.5); if (!mixer->mix_sys->cards) { @@ -106,12 +109,10 @@ mixer->mix_sys->cards = mixer->mix_sys->get_cards(); } - if (mixer->mix_sys->cards) + if ((mixer->mix_sys->cards) && (evas_list_count(mixer->mix_sys->cards) > 1)) { of = e_widget_framelist_add(evas, _("Available Cards"), 0); cg = e_widget_radio_group_new(&cfdata->card_id); - ob = e_widget_radio_add(evas, _("Unknown"), 0, cg); - e_widget_framelist_object_append(of, ob); for (cards = mixer->mix_sys->cards; cards; cards = cards->next) { card = cards->data; @@ -121,7 +122,7 @@ } e_widget_list_object_append(o, of, 1, 1, 0.5); } - + if ((mixer->mix_sys->get_card) && (ci->card_id != 0)) { card = mixer->mix_sys->get_card(ci->card_id); @@ -132,8 +133,6 @@ { of = e_widget_framelist_add(evas, _("Available Mixers"), 0); mg = e_widget_radio_group_new(&cfdata->channel_id); - ob = e_widget_radio_add(evas, _("Unknown"), 0, mg); - e_widget_framelist_object_append(of, ob); for (chans = card->channels; chans; chans = chans->next) { Mixer_Channel *chan; @@ -147,6 +146,7 @@ } } } + return o; } @@ -160,6 +160,10 @@ ci->card_id = cfdata->card_id; ci->channel_id = cfdata->channel_id; ci->mode = cfdata->mode; + ci->use_app = cfdata->use_app; + if (ci->app) evas_stringshare_del(ci->app); + if (cfdata->app != NULL) + ci->app = evas_stringshare_add(cfdata->app); e_config_save_queue(); return 1; === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -3 -r1.47 -r1.48 --- e_mod_main.c3 Oct 2006 02:18:04 - 1.47 +++ e_mod_main.c3 Oct 2006 03:39:15 - 1.48 @@ -24,10 +24,11 @@ static Evas_
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Fix popup window location for shelf positions. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -3 -r1.46 -r1.47 --- e_mod_main.c22 Sep 2006 10:08:00 - 1.46 +++ e_mod_main.c3 Oct 2006 02:18:04 - 1.47 @@ -761,24 +761,32 @@ switch (inst->gcc->gadcon->orient) { -case E_GADCON_ORIENT_LEFT: -case E_GADCON_ORIENT_CORNER_LT: -case E_GADCON_ORIENT_CORNER_LB: - win->x += cw; - if (win->to_top) win->y += oh; - break; -case E_GADCON_ORIENT_RIGHT: -case E_GADCON_ORIENT_CORNER_RT: -case E_GADCON_ORIENT_CORNER_RB: - win->x -= win->w; - if (win->to_top) win->y += oh; - break; -default: - win->x += (ow - win->w) / 2; - if (win->x < cx) win->x = cx; - if ((win->x + win->w) > (cx + cw)) win->x = cx + cw - win->w; - if (!win->to_top) win->y += ch; - break; + case E_GADCON_ORIENT_LEFT: + case E_GADCON_ORIENT_CORNER_LT: + case E_GADCON_ORIENT_CORNER_LB: + win->x += ox + ow; + if (win->to_top) win->y += oh; + break; + case E_GADCON_ORIENT_RIGHT: + case E_GADCON_ORIENT_CORNER_RT: + case E_GADCON_ORIENT_CORNER_RB: + win->x -= (win->w - ((cx + cw) - (ox + ow)) + 5); + if (win->to_top) win->y += oh; + break; + case E_GADCON_ORIENT_TOP: + case E_GADCON_ORIENT_CORNER_TL: + case E_GADCON_ORIENT_CORNER_TR: + win->x += ((ow - win->w) / 2); + if (win->x < cx) win->x = cx; + if ((win->x + win->w) > (cx + cw)) win->x = cx + cw - win->w; + if (!win->to_top) win->y += oh; + break; + default: + win->x += ((ow - win->w) / 2); + if (win->x < cx) win->x = cx; + if ((win->x + win->w) > (cx + cw)) win->x = cx + cw - win->w; + if (!win->to_top) win->y += (cy + ch); + break; } e_popup_move_resize(win->window, win->x, win->y, win->w, 0); - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Allow using "Wave" channel for SL :) === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- alsa_mixer.c14 Sep 2006 14:14:45 - 1.23 +++ alsa_mixer.c18 Sep 2006 11:03:31 - 1.24 @@ -124,7 +124,7 @@ if ((err = snd_mixer_detach(handle, buf)) < 0) { snd_mixer_close(handle); -break; +continue; } if ((err = snd_ctl_open(&control, buf, 0)) < 0) { @@ -154,7 +154,7 @@ card->channels = alsa_card_get_channels(card); return card; } - snd_ctl_close(control); + //snd_ctl_close(control); snd_mixer_close(handle); return NULL; } @@ -235,7 +235,8 @@ name = snd_mixer_selem_id_get_name(sid); if ((!strcmp(name, "Master")) || (!strcmp(name, "PCM")) || -(!strcmp(name, "DAC"))) +(!strcmp(name, "DAC")) || +!(strcmp(name, "Wave"))) { ac = E_NEW(Mixer_Channel, 1); if (!ac) continue; - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: oss_mixer.c Log Message: Fix segfault when going to configure, thanks for finding zoid, and spankies to CodeWarrior :) === RCS file: /cvs/e/e_modules/mixer/oss_mixer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- oss_mixer.c 14 Sep 2006 14:14:45 - 1.2 +++ oss_mixer.c 15 Sep 2006 12:01:11 - 1.3 @@ -112,7 +112,6 @@ if((hw_cards = _oss_scan_devices("Installed Devices"))) { - Evas_List *l; int i = 0; char *real; int size; @@ -124,7 +123,7 @@ real = malloc(size); snprintf(real, size, "/dev/mixer%d", i); card = E_NEW(Mixer_Card, 1); -card->name = evas_stringshare_add(l->data); +card->name = evas_stringshare_add(name); card->real = evas_stringshare_add(real); card->id = id; free(real); - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: configure.in Log Message: Be sure to set the have_alsa variable if we actually have it :) === RCS file: /cvs/e/e_modules/mixer/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- configure.in14 Sep 2006 14:14:45 - 1.6 +++ configure.in14 Sep 2006 14:36:14 - 1.7 @@ -155,7 +155,8 @@ if test "x$uname" = "xLinux"; then PKG_CHECK_MODULES(ALSA, [alsa >= 1.0.9], [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS" - SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ], + SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" + have_alsa=yes ], [ if test "x$enable_alsa" = "xyes"; then AC_MSG_ERROR([alsa library >= 1.0.9 not found]) fi ]) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: When setting mute, don't check for switch_joined. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- alsa_mixer.c12 Sep 2006 21:25:13 - 1.21 +++ alsa_mixer.c12 Sep 2006 21:42:00 - 1.22 @@ -549,7 +549,7 @@ id = _alsa_get_mixer_id(name); if (id == channel_id) { -if (snd_mixer_selem_has_playback_switch_joined(elem)) +if (snd_mixer_selem_has_playback_switch(elem)) snd_mixer_selem_set_playback_switch(elem, id, (mute == 1 ? 0: 1)); else { - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Should not need to rely on volume to set mute anymore. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -3 -r1.41 -r1.42 --- e_mod_main.c12 Sep 2006 21:25:13 - 1.41 +++ e_mod_main.c12 Sep 2006 21:26:44 - 1.42 @@ -96,8 +96,6 @@ edje_object_signal_emit(mixer->base, "medium", ""); else if (ret > 66) edje_object_signal_emit(mixer->base, "high", ""); - else if (ret <= 0) - edje_object_signal_emit(mixer->base, "muted", ""); } if ((mixer->mix_sys->get_mute) && (ci->card_id != 0) && (ci->channel_id != 0)) @@ -786,8 +784,6 @@ edje_object_signal_emit(mixer->base, "medium", ""); else if (val > 66) edje_object_signal_emit(mixer->base, "high", ""); -else if (val <= 0) - edje_object_signal_emit(mixer->base, "muted", ""); } } } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c e_mod_main.c Log Message: Removed printf. Moved around mute code. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- alsa_mixer.c12 Sep 2006 21:17:27 - 1.20 +++ alsa_mixer.c12 Sep 2006 21:25:13 - 1.21 @@ -487,7 +487,6 @@ { snd_mixer_close(handle); mute = alsa_get_volume(card_id, channel_id); - printf("\n\nVolume from alsa mute: %i\n\n", mute); if (mute <= 0) return 1; else === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- e_mod_main.c12 Sep 2006 21:15:23 - 1.40 +++ e_mod_main.c12 Sep 2006 21:25:13 - 1.41 @@ -582,31 +582,25 @@ edje_object_signal_emit(inst->mixer->base, "medium", ""); else if (vol > 66) edje_object_signal_emit(inst->mixer->base, "high", ""); -else if (vol <= 0) + +if (inst->mixer->mix_sys->get_mute) { - edje_object_signal_emit(inst->mixer->base, "muted", ""); - edje_object_signal_emit(e_slider_edje_object_get(win->slider), - "e,state,disabled", "e"); - } - } - } - - if (inst->mixer->mix_sys->get_mute) - { -int m; + int m; - m = inst->mixer->mix_sys->get_mute(ci->card_id, ci->channel_id); - e_widget_check_checked_set(win->check, m); - if (m) - { -edje_object_signal_emit(inst->mixer->base, "muted", ""); -edje_object_signal_emit(e_slider_edje_object_get(win->slider), -"e,state,disabled", "e"); - } - else - { -edje_object_signal_emit(e_slider_edje_object_get(win->slider), -"e,state,enabled", "e"); + m = inst->mixer->mix_sys->get_mute(ci->card_id, ci->channel_id); + e_widget_check_checked_set(win->check, m); + if (m) + { + edje_object_signal_emit(inst->mixer->base, "muted", ""); + edje_object_signal_emit(e_slider_edje_object_get(win->slider), + "e,state,disabled", "e"); + } + else + { + edje_object_signal_emit(e_slider_edje_object_get(win->slider), + "e,state,enabled", "e"); + } + } } } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: ++printf for sndev :) === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- alsa_mixer.c12 Sep 2006 21:05:02 - 1.19 +++ alsa_mixer.c12 Sep 2006 21:17:27 - 1.20 @@ -487,6 +487,7 @@ { snd_mixer_close(handle); mute = alsa_get_volume(card_id, channel_id); + printf("\n\nVolume from alsa mute: %i\n\n", mute); if (mute <= 0) return 1; else - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: Makefile.am Log Message: Add images to Extra_Dist, thanks Lutin :) === RCS file: /cvs/e/e_modules/mixer/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- Makefile.am 11 Sep 2006 11:21:43 - 1.5 +++ Makefile.am 12 Sep 2006 20:57:47 - 1.6 @@ -11,7 +11,11 @@ EXTRA_DIST = \ $(files_DATA) \ -mixer.edc +mixer.edc \ +mixer-volume-high.png \ +mixer-volume-medium.png \ +mixer-volume-low.png \ +mixer-volume-muted.png # data files for the module filesdir = $(datadir) @@ -43,4 +47,3 @@ rm -rf *.edj *~ uninstall: rm -rf $(datadir) - - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Added DAC support for gimpel. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- alsa_mixer.c12 Sep 2006 16:43:59 - 1.17 +++ alsa_mixer.c12 Sep 2006 20:51:31 - 1.18 @@ -231,7 +231,9 @@ const char *name; name = snd_mixer_selem_id_get_name(sid); -if ((!strcmp(name, "Master")) || (!strcmp(name, "PCM"))) +if ((!strcmp(name, "Master")) || +(!strcmp(name, "PCM")) || +(!strcmp(name, "DAC")) { ac = E_NEW(Mixer_Channel, 1); if (!ac) continue; - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c Log Message: Hide the Mode options. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_mod_config.c 12 Sep 2006 15:10:29 - 1.14 +++ e_mod_config.c 12 Sep 2006 17:36:43 - 1.15 @@ -2,7 +2,7 @@ #include "e_mod_main.h" #include "e_mod_types.h" -#define DEBUG 0 +//#define DEBUG 1 struct _E_Config_Dialog_Data { - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Added Files: TODO Log Message: Added a todo for things to do :) and for any buggers found. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Alsa mute fixes. Thanks Simon :) === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- alsa_mixer.c12 Sep 2006 15:51:44 - 1.13 +++ alsa_mixer.c12 Sep 2006 16:06:04 - 1.14 @@ -494,7 +494,7 @@ } snd_mixer_close(handle); - return mute; + return (mute == 1 ? 0: 1); } int @@ -548,7 +548,7 @@ if (id == channel_id) { if (snd_mixer_selem_has_playback_switch_joined(elem)) - snd_mixer_selem_set_playback_switch(elem, id, mute); + snd_mixer_selem_set_playback_switch(elem, id, (mute == 1 ? 0: 1)); else { snd_mixer_close(handle); - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Couple small changes, trying to track Simon's pcm bug. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- alsa_mixer.c12 Sep 2006 15:10:29 - 1.12 +++ alsa_mixer.c12 Sep 2006 15:51:44 - 1.13 @@ -483,12 +483,11 @@ } else { - int m; snd_mixer_close(handle); - m = alsa_get_volume(card_id, channel_id); - if (m <= 0) + mute = alsa_get_volume(card_id, channel_id); + if (mute <= 0) return 1; - else + else return 0; } } @@ -554,7 +553,7 @@ { snd_mixer_close(handle); if (mute) - alsa_set_volume(card_id, channel_id, 0.0); + alsa_set_volume(card_id, channel_id, (0.0 * 100)); else alsa_set_volume(card_id, channel_id, (0.5 * 100)); return 1; - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Fix pop-up window suddenly disappearing. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- e_mod_main.c12 Sep 2006 14:54:06 - 1.31 +++ e_mod_main.c12 Sep 2006 15:13:03 - 1.32 @@ -870,7 +870,7 @@ xev->button, EVAS_BUTTON_NONE, xev->time, NULL); } - else if (xev->button == 1) //&& !win->first_mouse_up) + else if ((xev->button == 1) && (!win->first_mouse_up)) _mixer_window_simple_pop_down(win->mixer->inst); if ((xev->button == 1) && win->first_mouse_up) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c e_mod_config.c Log Message: Fix some alsa errors during free and disable the Mode radios in config dialog. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- alsa_mixer.c12 Sep 2006 14:54:06 - 1.11 +++ alsa_mixer.c12 Sep 2006 15:10:29 - 1.12 @@ -60,9 +60,7 @@ cards = evas_list_append(cards, card); } - -snd_ctl_card_info_free(hw_info); - snd_mixer_close(handle); + snd_mixer_close(handle); return cards; } @@ -154,7 +152,6 @@ card->channels = alsa_card_get_channels(card); return card; } -snd_ctl_card_info_free(hw_info); snd_ctl_close(control); snd_mixer_close(handle); return NULL; === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- e_mod_config.c 12 Sep 2006 15:02:15 - 1.13 +++ e_mod_config.c 12 Sep 2006 15:10:29 - 1.14 @@ -2,7 +2,7 @@ #include "e_mod_main.h" #include "e_mod_types.h" -#define DEBUG 1 +#define DEBUG 0 struct _E_Config_Dialog_Data { - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c Log Message: Wrap the Mode options around an #ifdef for now so users don't get confused. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- e_mod_config.c 12 Sep 2006 12:17:47 - 1.12 +++ e_mod_config.c 12 Sep 2006 15:02:15 - 1.13 @@ -2,6 +2,8 @@ #include "e_mod_main.h" #include "e_mod_types.h" +#define DEBUG 1 + struct _E_Config_Dialog_Data { Evas_Object *list; @@ -86,6 +88,7 @@ ci = cfd->data; o = e_widget_list_add(evas, 0, 0); + #ifdef DEBUG of = e_widget_framelist_add(evas, _("Display Mode"), 0); dg = e_widget_radio_group_new(&cfdata->mode); ob = e_widget_radio_add(evas, _("Simple Mode"), SIMPLE_MODE, dg); @@ -95,7 +98,8 @@ ob = e_widget_radio_add(evas, _("Shelf Mode"), ONEFANG_MODE, dg); e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); - + #endif + if (!mixer->mix_sys->cards) { if (mixer->mix_sys->get_cards) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c e_mod_main.c e_mod_types.h Log Message: Alsa mute code should work now. On channels that don't support mute, we set the volume to 0. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- alsa_mixer.c11 Sep 2006 16:49:18 - 1.10 +++ alsa_mixer.c12 Sep 2006 14:54:06 - 1.11 @@ -60,6 +60,8 @@ cards = evas_list_append(cards, card); } + +snd_ctl_card_info_free(hw_info); snd_mixer_close(handle); return cards; } @@ -152,6 +154,7 @@ card->channels = alsa_card_get_channels(card); return card; } +snd_ctl_card_info_free(hw_info); snd_ctl_close(control); snd_mixer_close(handle); return NULL; @@ -471,15 +474,27 @@ snd_mixer_selem_id_alloca(&sid); snd_mixer_selem_get_id(elem, sid); if (!snd_mixer_selem_is_active(elem)) continue; - - name = snd_mixer_selem_id_get_name(sid); + + name = snd_mixer_selem_id_get_name(sid); id = _alsa_get_mixer_id(name); if (id == channel_id) { -if (snd_mixer_selem_has_playback_switch_joined(elem)) - snd_mixer_selem_get_playback_switch(elem, 0, &mute); -break; - } +if (snd_mixer_selem_has_playback_switch(elem)) + { + snd_mixer_selem_get_playback_switch(elem, id, &mute); + break; + } +else + { + int m; + snd_mixer_close(handle); + m = alsa_get_volume(card_id, channel_id); + if (m <= 0) + return 1; + else + return 0; + } + } } snd_mixer_close(handle); @@ -531,13 +546,22 @@ snd_mixer_selem_id_alloca(&sid); snd_mixer_selem_get_id(elem, sid); if (!snd_mixer_selem_is_active(elem)) continue; - + name = snd_mixer_selem_id_get_name(sid); id = _alsa_get_mixer_id(name); if (id == channel_id) { -if (snd_mixer_selem_has_playback_switch_joined(elem)) - snd_mixer_selem_set_playback_switch_all(elem, mute); +if (snd_mixer_selem_has_playback_switch_joined(elem)) + snd_mixer_selem_set_playback_switch(elem, id, mute); +else + { + snd_mixer_close(handle); + if (mute) + alsa_set_volume(card_id, channel_id, 0.0); + else + alsa_set_volume(card_id, channel_id, (0.5 * 100)); + return 1; + } break; } } === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- e_mod_main.c12 Sep 2006 12:54:20 - 1.30 +++ e_mod_main.c12 Sep 2006 14:54:06 - 1.31 @@ -95,6 +95,17 @@ edje_object_signal_emit(mixer->base, "medium", ""); else if (ret > 66) edje_object_signal_emit(mixer->base, "high", ""); + else if (ret <= 0) + edje_object_signal_emit(mixer->base, "muted", ""); + } + + if ((mixer->mix_sys->get_mute) && (ci->card_id != 0) && (ci->channel_id != 0)) + { +int m; + + m = mixer->mix_sys->get_mute(ci->card_id, ci->channel_id); + if (m) + edje_object_signal_emit(mixer->base, "muted", ""); } gcc = e_gadcon_client_new(gc, name, id, style, mixer->base); @@ -551,7 +562,7 @@ evas_event_feed_mouse_in(win->window->evas, ecore_time_get(), NULL); } - + if (inst->mixer->mix_sys->get_volume) { int vol; @@ -559,6 +570,8 @@ if ((ci->card_id != 0) && (ci->channel_id != 0)) { +edje_object_signal_emit(e_slider_edje_object_get(win->slider), +"e,state,enabled", "e"); vol = inst->mixer->mix_sys->get_volume(ci->card_id, ci->channel_id); v = (1.0 - ((double)vol / 100)); e_slider_value_set(win->slider, v); @@ -568,8 +581,33 @@ edje_object_signal_emit(inst->mixer->base, "medium", ""); else if (vol > 66) edje_object_signal_emit(inst->mixer->base, "high", ""); +else if (vol <= 0) + { + edje_object_signal_emit(inst->mixer->base, "muted", ""); + edje_object_signal_emit(e_slider_edje_object_get(win->slider), +
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: configure.in Log Message: Some FreeBSD corrections for CodeWarrior to detect Alsa :) === RCS file: /cvs/e/e_modules/mixer/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- configure.in7 Sep 2006 14:20:07 - 1.4 +++ configure.in12 Sep 2006 12:40:42 - 1.5 @@ -21,6 +21,11 @@ AC_SUBST(MODULE_ARCH) AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") +uname=`uname` + +AM_CONDITIONAL(BUILD_LINUX, test x$uname = xLinux) +AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD) + if test "x${bindir}" = 'x${exec_prefix}/bin'; then if test "x${exec_prefix}" = "xNONE"; then if test "x${prefix}" = "xNONE"; then @@ -147,13 +152,24 @@ [ enable_alsa=$enableval ], [ enable_alsa=default ]) if test "x$enable_alsa" = "xdefault" || test "x$enable_alsa" = "xyes"; then + if test "x$uname" = "xLinux"; then AM_PATH_ALSA(1.0.9, [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS" SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ], [ if test "x$enable_alsa" = "xyes"; then AC_MSG_ERROR([alsa library >= 1.0.9 not found]) - fi ]) -fi + fi ]) + else + if test "x$uname" = "xFreeBSD"; then + PKG_CHECK_MODULES(ALSA, [alsa >= 1.0.9], + [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS" + SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ], + [ if test "x$enable_alsa" = "xyes"; then + AC_MSG_ERROR([alsa library >= 1.0.9 not found]) + fi ]) + fi + fi +fi AC_SUBST(SOUND_CFLAGS) AC_SUBST(SOUND_LDFLAGS) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c e_mod_main.c e_mod_main.h e_mod_types.h Log Message: Added options for setting mixer display mode. Only "Simple" mode is implemented right now. May need a module.mixer.cfg remove for this as it is a new option. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- e_mod_config.c 12 Sep 2006 12:01:35 - 1.11 +++ e_mod_config.c 12 Sep 2006 12:17:47 - 1.12 @@ -8,6 +8,7 @@ int card_id; int channel_id; + int mode; }; /* Protos */ @@ -50,6 +51,7 @@ { cfdata->card_id = ci->card_id; cfdata->channel_id = ci->channel_id; + cfdata->mode = ci->mode; } static void * @@ -78,12 +80,22 @@ Evas_Object *o, *ob, *of; Evas_List *cards, *chans; Config_Item *ci; - E_Radio_Group *cg, *mg; + E_Radio_Group *cg, *mg, *dg; Mixer_Card*card; ci = cfd->data; o = e_widget_list_add(evas, 0, 0); + of = e_widget_framelist_add(evas, _("Display Mode"), 0); + dg = e_widget_radio_group_new(&cfdata->mode); + ob = e_widget_radio_add(evas, _("Simple Mode"), SIMPLE_MODE, dg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("Full Mode"), FULL_MODE, dg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, _("Shelf Mode"), ONEFANG_MODE, dg); + e_widget_framelist_object_append(of, ob); + e_widget_list_object_append(o, of, 1, 1, 0.5); + if (!mixer->mix_sys->cards) { if (mixer->mix_sys->get_cards) @@ -143,6 +155,8 @@ ci->card_id = cfdata->card_id; ci->channel_id = cfdata->channel_id; + ci->mode = cfdata->mode; + e_config_save_queue(); return 1; } === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- e_mod_main.c12 Sep 2006 12:01:35 - 1.28 +++ e_mod_main.c12 Sep 2006 12:17:47 - 1.29 @@ -195,7 +195,9 @@ { if (ev->flags == EVAS_BUTTON_DOUBLE_CLICK) { -/* Call full mixer window */ +/* Call full mixer window. + For now just call simple till this mode is made */ +_mixer_window_simple_pop_up(inst); } else if (ev->flags == EVAS_BUTTON_NONE) { @@ -250,6 +252,7 @@ { ci->card_id = 0; ci->channel_id = 0; + ci->mode = SIMPLE_MODE; } else if (mixer->mix_sys) { @@ -261,6 +264,7 @@ { ci->card_id = 0; ci->channel_id = 0; + ci->mode = SIMPLE_MODE; mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; } @@ -271,6 +275,7 @@ { ci->card_id = 0; ci->channel_id = 0; +ci->mode = SIMPLE_MODE; mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; } @@ -291,7 +296,8 @@ ci->channel_id = 0; } } - + + ci->mode = SIMPLE_MODE; mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; } @@ -353,6 +359,7 @@ E_CONFIG_VAL(D, T, id, STR); E_CONFIG_VAL(D, T, card_id, INT); E_CONFIG_VAL(D, T, channel_id, INT); + E_CONFIG_VAL(D, T, mode, INT); conf_edd = E_CONFIG_DD_NEW("Mixer_Config", Config); #undef T @@ -371,7 +378,7 @@ ci->id = evas_stringshare_add("0"); ci->card_id = 0; ci->channel_id = 0; - + ci->mode = SIMPLE_MODE; mixer_config->items = evas_list_append(mixer_config->items, ci); } === RCS file: /cvs/e/e_modules/mixer/e_mod_main.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- e_mod_main.h11 Sep 2006 11:21:43 - 1.5 +++ e_mod_main.h12 Sep 2006 12:17:47 - 1.6 @@ -19,6 +19,7 @@ int card_id; int channel_id; + int mode; }; EAPI extern E_Module_Api e_modapi; === RCS file: /cvs/e/e_modules/mixer/e_mod_types.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- e_mod_types.h 11 Sep 2006 18:24:27 - 1.5 +++ e_mod_types.h 12 Sep 2006 12:17:47 - 1.6 @@ -7,6 +7,7 @@ typedef struct _Mixer_System Mixer_System; typedef struct _Mixer_Card Mixer_Card; typedef struct _Mixer_Channel Mixer_Channel; +typedef enum _Mixer_Mode Mixer_Mode; struct _Instance { @@ -80,6 +81,13 @@ int id, card_id; const char *name; +}; + +
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c e_mod_main.c Log Message: Automatic card/channel detection on fresh startup should work now. Removed some printfs in config dialog. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- e_mod_config.c 11 Sep 2006 19:14:56 - 1.10 +++ e_mod_config.c 12 Sep 2006 12:01:35 - 1.11 @@ -115,7 +115,6 @@ if (card->channels) { of = e_widget_framelist_add(evas, _("Available Mixers"), 0); - printf("\n\nChannel: %i\n\n", cfdata->channel_id); mg = e_widget_radio_group_new(&cfdata->channel_id); ob = e_widget_radio_add(evas, _("Unknown"), 0, mg); e_widget_framelist_object_append(of, ob); @@ -144,8 +143,6 @@ ci->card_id = cfdata->card_id; ci->channel_id = cfdata->channel_id; - printf("\n\nChannel: %i\n\n", cfdata->channel_id); - e_config_save_queue(); return 1; } === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- e_mod_main.c12 Sep 2006 10:41:56 - 1.27 +++ e_mod_main.c12 Sep 2006 12:01:35 - 1.28 @@ -18,7 +18,7 @@ static Evas_Object *_gc_icon (Evas * evas); /* Module Protos */ -static Config_Item *_mixer_config_item_get (const char *id); +static Config_Item *_mixer_config_item_get (void *data, const char *id); static void _mixer_menu_cb_post (void *data, E_Menu *m); static void _mixer_menu_cb_configure (void *data, E_Menu *m, E_Menu_Item *mi); static void _mixer_cb_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info); @@ -80,7 +80,7 @@ _mixer_system_init(mixer); /* Defer this until after the mixer system has been setup */ - ci = _mixer_config_item_get(id); + ci = _mixer_config_item_get(mixer, id); if (!ci->id) ci->id = evas_stringshare_add(id); if ((mixer->mix_sys->get_volume) && (ci->card_id != 0) && (ci->channel_id != 0)) @@ -221,17 +221,22 @@ inst = data; if (!inst) return; - ci = _mixer_config_item_get(inst->gcc->id); + ci = _mixer_config_item_get(inst->mixer, inst->gcc->id); if (!ci) return; _config_mixer_module(inst->mixer, ci); } static Config_Item * -_mixer_config_item_get(const char *id) +_mixer_config_item_get(void *data, const char *id) { - Evas_List *l; - Config_Item *ci; + Mixer *mixer; + Mixer_Card*card; + Mixer_Channel *chan; + Evas_List *l; + Config_Item *ci; + mixer = data; + for (l = mixer_config->items; l; l = l->next) { ci = l->data; @@ -241,8 +246,51 @@ ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add(id); - ci->card_id = 0; - ci->channel_id = 0; + if ((!mixer) || (!mixer->mix_sys)) + { + ci->card_id = 0; + ci->channel_id = 0; + } + else if (mixer->mix_sys) + { + if (!mixer->mix_sys->cards) + { +if (mixer->mix_sys->get_cards) + mixer->mix_sys->cards = mixer->mix_sys->get_cards(); +else + { + ci->card_id = 0; + ci->channel_id = 0; + mixer_config->items = evas_list_append(mixer_config->items, ci); + return ci; + } + } + + card = mixer->mix_sys->cards->data; + if (!card) + { +ci->card_id = 0; +ci->channel_id = 0; +mixer_config->items = evas_list_append(mixer_config->items, ci); +return ci; + } + else + { +ci->card_id = card->id; +if (!card->channels) + { + if (mixer->mix_sys->get_channels) + card->channels = mixer->mix_sys->get_channels(card); + } +if (card->channels) + { + chan = card->channels->data; + ci->channel_id = chan->id; + } +else + ci->channel_id = 0; + } + } mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; @@ -377,7 +425,7 @@ Config_Item *ci; inst = l->data; - ci = _mixer_config_item_get(inst->gcc->id); + ci = _mixer_config_item_get(inst->mixer, inst->gcc->id); if (ci->id) evas_stringshare_del(ci->id); ci->id = evas_stringshare_add(inst->gcc->id); } @@ -407,7 +455,7 @@ if (!inst || !inst->mixer) return; if (!(con = e_container_current_get(e_manager_current_get( return;
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Proper setting of icon on initial startup of module. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- e_mod_main.c11 Sep 2006 19:14:56 - 1.26 +++ e_mod_main.c12 Sep 2006 10:41:56 - 1.27 @@ -82,6 +82,19 @@ /* Defer this until after the mixer system has been setup */ ci = _mixer_config_item_get(id); if (!ci->id) ci->id = evas_stringshare_add(id); + + if ((mixer->mix_sys->get_volume) && (ci->card_id != 0) && (ci->channel_id != 0)) + { + int ret; + + ret = mixer->mix_sys->get_volume(ci->card_id, ci->channel_id); + if (ret < 33) + edje_object_signal_emit(mixer->base, "low", ""); + else if ((ret >= 34) && (ret < 66)) + edje_object_signal_emit(mixer->base, "medium", ""); + else if (ret > 66) + edje_object_signal_emit(mixer->base, "high", ""); + } gcc = e_gadcon_client_new(gc, name, id, style, mixer->base); gcc->data = inst; @@ -477,7 +490,13 @@ { vol = inst->mixer->mix_sys->get_volume(ci->card_id, ci->channel_id); v = (1.0 - ((double)vol / 100)); -e_slider_value_set(win->slider, v); +e_slider_value_set(win->slider, v); +if (vol < 33) + edje_object_signal_emit(inst->mixer->base, "low", ""); +else if ((vol >= 34) && (vol < 66)) + edje_object_signal_emit(inst->mixer->base, "medium", ""); +else if (vol > 66) + edje_object_signal_emit(inst->mixer->base, "high", ""); } } @@ -642,7 +661,6 @@ else if (val > 66) edje_object_signal_emit(mixer->base, "high", ""); } - } } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c e_mod_main.c Log Message: Fix some buggers where card_id was 0. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- e_mod_config.c 11 Sep 2006 15:22:46 - 1.9 +++ e_mod_config.c 11 Sep 2006 19:14:56 - 1.10 @@ -106,7 +106,7 @@ e_widget_list_object_append(o, of, 1, 1, 0.5); } - if (mixer->mix_sys->get_card) + if ((mixer->mix_sys->get_card) && (ci->card_id != 0)) { card = mixer->mix_sys->get_card(ci->card_id); if ((mixer->mix_sys->get_channels) && (card)) === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- e_mod_main.c11 Sep 2006 19:00:30 - 1.25 +++ e_mod_main.c11 Sep 2006 19:14:56 - 1.26 @@ -473,9 +473,12 @@ int vol; double v; -vol = inst->mixer->mix_sys->get_volume(ci->card_id, ci->channel_id); -v = (1.0 - ((double)vol / 100)); -e_slider_value_set(win->slider, v); + if ((ci->card_id != 0) && (ci->channel_id != 0)) + { +vol = inst->mixer->mix_sys->get_volume(ci->card_id, ci->channel_id); +v = (1.0 - ((double)vol / 100)); +e_slider_value_set(win->slider, v); + } } e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, &cw, &ch); - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: More diligent about closing alsa mixer handles. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- alsa_mixer.c11 Sep 2006 16:09:01 - 1.9 +++ alsa_mixer.c11 Sep 2006 16:49:18 - 1.10 @@ -60,7 +60,7 @@ cards = evas_list_append(cards, card); } - + snd_mixer_close(handle); return cards; } @@ -127,16 +127,19 @@ if ((err = snd_ctl_open(&control, buf, 0)) < 0) { printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); +snd_mixer_close(handle); continue; } if ((err = snd_ctl_card_info(control, hw_info)) < 0) { printf("Cannot get hardware info: %s: %s\n", buf, snd_strerror(err)); snd_ctl_close(control); +snd_mixer_close(handle); continue; } snd_ctl_close(control); + snd_mixer_close(handle); card = E_NEW(Mixer_Card, 1); if (!card) continue; @@ -145,10 +148,12 @@ card->id = _alsa_get_card_id(card->real); if (!_alsa_get_card_id(card->real) == id) continue; - - card->channels = alsa_card_get_channels(card); + + card->channels = alsa_card_get_channels(card); return card; } + snd_ctl_close(control); + snd_mixer_close(handle); return NULL; } @@ -238,6 +243,7 @@ } } } + snd_mixer_close(handle); return channels; } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Added Files: oss_mixer.h oss_mixer.c Log Message: Start of some OSS code. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Add missing variable decs. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- alsa_mixer.c11 Sep 2006 16:01:30 - 1.8 +++ alsa_mixer.c11 Sep 2006 16:09:01 - 1.9 @@ -427,7 +427,7 @@ snd_mixer_t *handle; snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - int id, mute = 0; + int err, id, mute = 0; const char *name; card = alsa_get_card(card_id); @@ -487,7 +487,7 @@ snd_mixer_t *handle; snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - int id; + int id, err; const char *name; card = alsa_get_card(card_id); - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.h Log Message: Add missing get/set mute protos. Thanks Mo0m :) === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- alsa_mixer.h11 Sep 2006 14:44:42 - 1.6 +++ alsa_mixer.h11 Sep 2006 16:06:29 - 1.7 @@ -24,4 +24,7 @@ int alsa_get_volume(int card_id, int channel_id); int alsa_set_volume(int card_id, int channel_id, double vol); +int alsa_get_mute(int card_id, int channel_id); +int alsa_set_mute(int card_id, int channel_id, int mute); + #endif - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: Added alsa mixer mute get/set functions. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- alsa_mixer.c11 Sep 2006 15:49:47 - 1.7 +++ alsa_mixer.c11 Sep 2006 16:01:30 - 1.8 @@ -423,13 +423,121 @@ int alsa_get_mute(int card_id, int channel_id) { - return 0; + Mixer_Card *card; + snd_mixer_t *handle; + snd_mixer_elem_t *elem; + snd_mixer_selem_id_t *sid; + int id, mute = 0; + const char *name; + + card = alsa_get_card(card_id); + if (!card) return 0; + + if ((err = snd_mixer_open(&handle, 0)) < 0) + { + printf("Cannot open mixer: %s\n", snd_strerror(err)); + return 0; + } + + if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) + { + printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) + { + printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_load(handle)) < 0) + { + printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) + { + snd_mixer_selem_id_alloca(&sid); + snd_mixer_selem_get_id(elem, sid); + if (!snd_mixer_selem_is_active(elem)) continue; + + name = snd_mixer_selem_id_get_name(sid); + id = _alsa_get_mixer_id(name); + if (id == channel_id) + { +if (snd_mixer_selem_has_playback_switch_joined(elem)) + snd_mixer_selem_get_playback_switch(elem, 0, &mute); +break; + } + } + + snd_mixer_close(handle); + return mute; } int alsa_set_mute(int card_id, int channel_id, int mute) { - return 0; + Mixer_Card *card; + snd_mixer_t *handle; + snd_mixer_elem_t *elem; + snd_mixer_selem_id_t *sid; + int id; + const char *name; + + card = alsa_get_card(card_id); + if (!card) return 0; + + if ((err = snd_mixer_open(&handle, 0)) < 0) + { + printf("Cannot open mixer: %s\n", snd_strerror(err)); + return 0; + } + + if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) + { + printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) + { + printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_load(handle)) < 0) + { + printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) + { + snd_mixer_selem_id_alloca(&sid); + snd_mixer_selem_get_id(elem, sid); + if (!snd_mixer_selem_is_active(elem)) continue; + + name = snd_mixer_selem_id_get_name(sid); + id = _alsa_get_mixer_id(name); + if (id == channel_id) + { +if (snd_mixer_selem_has_playback_switch_joined(elem)) + snd_mixer_selem_set_playback_switch_all(elem, mute); +break; + } + } + + snd_mixer_close(handle); + return 1; } /* Privates */ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c e_mod_main.c e_mod_types.h Log Message: Beginnings of mute code for alsa. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- alsa_mixer.c11 Sep 2006 14:44:42 - 1.6 +++ alsa_mixer.c11 Sep 2006 15:49:47 - 1.7 @@ -420,6 +420,18 @@ return 1; } +int +alsa_get_mute(int card_id, int channel_id) +{ + return 0; +} + +int +alsa_set_mute(int card_id, int channel_id, int mute) +{ + return 0; +} + /* Privates */ static int _alsa_get_hash(const char *name) === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- e_mod_main.c11 Sep 2006 15:44:29 - 1.19 +++ e_mod_main.c11 Sep 2006 15:49:47 - 1.20 @@ -254,6 +254,9 @@ sys->get_volume = alsa_get_volume; sys->set_volume = alsa_set_volume; + + sys->get_mute = alsa_get_mute; + sys->set_mute = alsa_set_mute; #endif } === RCS file: /cvs/e/e_modules/mixer/e_mod_types.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_mod_types.h 11 Sep 2006 14:44:42 - 1.2 +++ e_mod_types.h 11 Sep 2006 15:49:47 - 1.3 @@ -50,7 +50,10 @@ int(*set_volume) (int card_id, int channel_id, double vol); int(*get_volume) (int card_id, int channel_id); - + + int(*get_mute) (int card_id, int channel_id); + int(*set_mute) (int card_id, int channel_id, int mute); + void (*free_cards) (void *data); Evas_List *cards; - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Fix icon state. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- e_mod_main.c11 Sep 2006 15:39:41 - 1.18 +++ e_mod_main.c11 Sep 2006 15:44:29 - 1.19 @@ -600,11 +600,11 @@ ret = mixer->mix_sys->set_volume(ci->card_id, ci->channel_id, val); if (ret) { -if ((val * 100) < 33) +if (val < 33) edje_object_signal_emit(mixer->base, "low", ""); -else if (((val * 100) >= 34) && ((val * 100) < 66)) +else if ((val >= 34) && (val < 66)) edje_object_signal_emit(mixer->base, "medium", ""); -else if ((val * 100) > 66) +else if (val > 66) edje_object_signal_emit(mixer->base, "high", ""); } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Fix slider value not setting correctly. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- e_mod_main.c11 Sep 2006 15:24:11 - 1.17 +++ e_mod_main.c11 Sep 2006 15:39:41 - 1.18 @@ -435,7 +435,7 @@ double v; vol = inst->mixer->mix_sys->get_volume(ci->card_id, ci->channel_id); -v = ((double)vol) / 100; +v = (1.0 - ((double)vol / 100)); e_slider_value_set(win->slider, v); } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Disable the debug code for now. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- e_mod_main.c11 Sep 2006 15:22:46 - 1.16 +++ e_mod_main.c11 Sep 2006 15:24:11 - 1.17 @@ -7,7 +7,7 @@ #endif /* Define to 1 for testing alsa code */ -#define DEBUG 1 +#define DEBUG 0 #define SLIDE_LENGTH 0.5 /* Gadcon Protos */ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c e_mod_main.c Log Message: Make channel config save properly. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- e_mod_config.c 11 Sep 2006 14:44:42 - 1.8 +++ e_mod_config.c 11 Sep 2006 15:22:46 - 1.9 @@ -115,6 +115,7 @@ if (card->channels) { of = e_widget_framelist_add(evas, _("Available Mixers"), 0); + printf("\n\nChannel: %i\n\n", cfdata->channel_id); mg = e_widget_radio_group_new(&cfdata->channel_id); ob = e_widget_radio_add(evas, _("Unknown"), 0, mg); e_widget_framelist_object_append(of, ob); @@ -143,6 +144,7 @@ ci->card_id = cfdata->card_id; ci->channel_id = cfdata->channel_id; + printf("\n\nChannel: %i\n\n", cfdata->channel_id); e_config_save_queue(); return 1; === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- e_mod_main.c11 Sep 2006 14:44:42 - 1.15 +++ e_mod_main.c11 Sep 2006 15:22:46 - 1.16 @@ -285,6 +285,7 @@ #define D conf_item_edd E_CONFIG_VAL(D, T, id, STR); E_CONFIG_VAL(D, T, card_id, INT); + E_CONFIG_VAL(D, T, channel_id, INT); conf_edd = E_CONFIG_DD_NEW("Mixer_Config", Config); #undef T @@ -297,13 +298,13 @@ if (!mixer_config) { Config_Item *ci; - + mixer_config = E_NEW(Config, 1); ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add("0"); ci->card_id = 0; ci->channel_id = 0; - + mixer_config->items = evas_list_append(mixer_config->items, ci); } @@ -569,8 +570,6 @@ Mixer_Win_Simple *win; if (!(win = data)) return; - - printf("Mouse up\n"); _mixer_window_simple_pop_down(win->mixer->inst); } @@ -599,17 +598,16 @@ int ret; ret = mixer->mix_sys->set_volume(ci->card_id, ci->channel_id, val); - if (!ret) + if (ret) { -printf("\n\nVol Set Failed\n\n"); +if ((val * 100) < 33) + edje_object_signal_emit(mixer->base, "low", ""); +else if (((val * 100) >= 34) && ((val * 100) < 66)) + edje_object_signal_emit(mixer->base, "medium", ""); +else if ((val * 100) > 66) + edje_object_signal_emit(mixer->base, "high", ""); } - if ((val * 100) < 33) - edje_object_signal_emit(mixer->base, "low", ""); - else if (((val * 100) >= 34) && ((val * 100) < 66)) - edje_object_signal_emit(mixer->base, "medium", ""); - else if ((val * 100) > 66) - edje_object_signal_emit(mixer->base, "high", ""); } } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c alsa_mixer.h e_mod_config.c e_mod_main.c e_mod_types.h Log Message: Can now set/get volume for alsa drivers. Still a problem in config dialog, and with the e_slider tho. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- alsa_mixer.c11 Sep 2006 12:00:11 - 1.5 +++ alsa_mixer.c11 Sep 2006 14:44:42 - 1.6 @@ -260,59 +260,164 @@ alsa_get_volume(int card_id, int channel_id) { Mixer_Card *card; - Mixer_Channel*chan; - snd_mixer_elem_t *elem; snd_mixer_t *handle; + snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - int err, i; - long vol = 0; + int err, range, ret = 0; + long min, max, vol; card = alsa_get_card(card_id); if (!card) return 0; - chan = _alsa_card_get_channel(card, channel_id); - if (!chan) return 0; - - printf("\n\nGet Volume\n"); if ((err = snd_mixer_open(&handle, 0)) < 0) { printf("Cannot open mixer: %s\n", snd_strerror(err)); return 0; } - for (i = 0, elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) + if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) + { + printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) + { + printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_load(handle)) < 0) + { + printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) { + snd_mixer_selem_id_alloca(&sid); snd_mixer_selem_get_id(elem, sid); if (!snd_mixer_selem_is_active(elem)) continue; - + if (snd_mixer_selem_has_playback_volume(elem)) { const char *name; +int id; name = snd_mixer_selem_id_get_name(sid); -if (!strcmp(name, chan->name)) +id = _alsa_get_mixer_id(name); +if (id == channel_id) { snd_mixer_selem_get_playback_volume(elem, 0, &vol); + snd_mixer_selem_get_playback_volume_range(elem, &min, &max); + range = max - min; + if (range == 0) + vol = 0; + else + vol -= min; + ret = rint(((double)vol / ((double)range) * 100)); break; } } } - return (int)vol; + + snd_mixer_close(handle); + return ret; } int -alsa_set_volume(int card_id, int channel_id, int vol) +alsa_set_volume(int card_id, int channel_id, double vol) { - Mixer_Card*card; - Mixer_Channel *chan; + Mixer_Card *card; + snd_mixer_t *handle; + snd_mixer_elem_t *elem; + snd_mixer_selem_id_t *sid; + int err, range, v; + long min, max; card = alsa_get_card(card_id); if (!card) return 0; - chan = _alsa_card_get_channel(card, channel_id); - if (!chan) return 0; + if ((err = snd_mixer_open(&handle, 0)) < 0) + { + printf("Cannot open mixer: %s\n", snd_strerror(err)); + return 0; + } + + if ((err = snd_mixer_attach(handle, (char *)card->name)) < 0) + { + printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) + { + printf("\n\nCannot Register Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + if ((err = snd_mixer_load(handle)) < 0) + { + printf("\n\nCannot Load Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return 0; + } + + for (elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) + { + snd_mixer_selem_id_alloca(&sid); + snd_mixer_selem_get_id(elem, sid); + if (!snd_mixer_selem_is_active(elem)) continue; + + if (snd_mixer_selem_has_playback_volume(elem)) + { +const char *name; +int id; + +name = snd_mixer_selem_id_get_name(sid); +id = _alsa_get_mixer_id(name); +if (id == channel_id) + { + snd_mixer_selem_get_playback_volume_range(elem, &min, &max); +
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c Log Message: Traps for card/channels being NULL. === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- e_mod_config.c 11 Sep 2006 11:23:01 - 1.6 +++ e_mod_config.c 11 Sep 2006 12:07:34 - 1.7 @@ -109,23 +109,27 @@ if (mixer->mix_sys->get_card) { card = mixer->mix_sys->get_card(ci->card_id); - if (mixer->mix_sys->get_channels) - card->channels = mixer->mix_sys->get_channels(card); - - of = e_widget_framelist_add(evas, _("Available Mixers"), 0); - mg = e_widget_radio_group_new(&cfdata->channel_id); - ob = e_widget_radio_add(evas, _("Unknown"), 0, mg); - e_widget_framelist_object_append(of, ob); - for (chans = card->channels; chans; chans = chans->next) + if ((mixer->mix_sys->get_channels) && (card)) { -Mixer_Channel *chan; - -chan = chans->data; -if (!chan) continue; -ob = e_widget_radio_add(evas, (char *)chan->name, chan->id, mg); -e_widget_framelist_object_append(of, ob); - } - e_widget_list_object_append(o, of, 1, 1, 0.5); +card->channels = mixer->mix_sys->get_channels(card); +if (card->channels) + { + of = e_widget_framelist_add(evas, _("Available Mixers"), 0); + mg = e_widget_radio_group_new(&cfdata->channel_id); + ob = e_widget_radio_add(evas, _("Unknown"), 0, mg); + e_widget_framelist_object_append(of, ob); + for (chans = card->channels; chans; chans = chans->next) + { + Mixer_Channel *chan; + + chan = chans->data; + if (!chan) continue; + ob = e_widget_radio_add(evas, (char *)chan->name, chan->id, mg); + e_widget_framelist_object_append(of, ob); + } + e_widget_list_object_append(o, of, 1, 1, 0.5); + } + } } return o; } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c alsa_mixer.h e_mod_main.c Log Message: Make sure we setup a default config if there is none. Some work on get/set volume for alsa (not done yet). === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- alsa_mixer.c11 Sep 2006 11:21:43 - 1.4 +++ alsa_mixer.c11 Sep 2006 12:00:11 - 1.5 @@ -259,8 +259,13 @@ int alsa_get_volume(int card_id, int channel_id) { - Mixer_Card*card; - Mixer_Channel *chan; + Mixer_Card *card; + Mixer_Channel*chan; + snd_mixer_elem_t *elem; + snd_mixer_t *handle; + snd_mixer_selem_id_t *sid; + int err, i; + long vol = 0; card = alsa_get_card(card_id); if (!card) return 0; @@ -268,7 +273,31 @@ chan = _alsa_card_get_channel(card, channel_id); if (!chan) return 0; - printf("Get Volume\n"); + printf("\n\nGet Volume\n"); + if ((err = snd_mixer_open(&handle, 0)) < 0) + { + printf("Cannot open mixer: %s\n", snd_strerror(err)); + return 0; + } + + for (i = 0, elem = snd_mixer_first_elem(handle); elem; elem = snd_mixer_elem_next(elem)) + { + snd_mixer_selem_get_id(elem, sid); + if (!snd_mixer_selem_is_active(elem)) continue; + + if (snd_mixer_selem_has_playback_volume(elem)) + { +const char *name; + +name = snd_mixer_selem_id_get_name(sid); +if (!strcmp(name, chan->name)) + { + snd_mixer_selem_get_playback_volume(elem, 0, &vol); + break; + } + } + } + return (int)vol; } int === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- alsa_mixer.h11 Sep 2006 11:21:43 - 1.4 +++ alsa_mixer.h11 Sep 2006 12:00:11 - 1.5 @@ -21,7 +21,7 @@ void*alsa_card_get_channel (void *data, int channel_id); void alsa_free_cards(void *data); -int alsa_get_volume(int card_id, int channel_id); -int alsa_set_volume(int card_id, int channel_id, int vol); +int alsa_get_volume(int card_id, int channel_id); +int alsa_set_volume(int card_id, int channel_id, int vol); #endif === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- e_mod_main.c11 Sep 2006 11:21:43 - 1.12 +++ e_mod_main.c11 Sep 2006 12:00:11 - 1.13 @@ -225,7 +225,9 @@ ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add(id); - + ci->card_id = 0; + ci->channel_id = 0; + mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; } @@ -292,9 +294,19 @@ E_CONFIG_LIST(D, T, items, conf_item_edd); mixer_config = e_config_domain_load("module.mixer", conf_edd); - if (!mixer_config) - mixer_config = E_NEW(Config, 1); - + if (!mixer_config) + { + Config_Item *ci; + + mixer_config = E_NEW(Config, 1); + ci = E_NEW(Config_Item, 1); + ci->id = evas_stringshare_add("0"); + ci->card_id = 0; + ci->channel_id = 0; + + mixer_config->items = evas_list_append(mixer_config->items, ci); + } + mixer_config->module = m; e_gadcon_provider_register(&_gc_class); @@ -366,14 +378,18 @@ _mixer_window_simple_pop_up(Instance *inst) { E_Container *con; + Config_Item *ci; Mixer_Win_Simple *win; Evas_Coord ox, oy, ow, oh; Evas_Coord sw, sh; - int cx, cy, cw, ch; + int cx, cy, cw, ch, vol; if (!inst || !inst->mixer) return; if (!(con = e_container_current_get(e_manager_current_get( return; + ci = _mixer_config_item_get(inst->gcc->id); + if (!ci) return; + evas_object_geometry_get(inst->mixer->base, &ox, &oy, &ow, &oh); if (!(win = inst->mixer->simple_win)) @@ -413,7 +429,14 @@ evas_object_show(win->slider); evas_object_smart_callback_add(win->slider, "changed", _mixer_window_simple_changed_cb, win); - + if (inst->mixer->mix_sys->get_volume) + { +// vol = inst->mixer->mix_sys->get_volume(ci->card_id, ci->channel_id); +// vol = vol * 100; +// printf("\n\nVolume: %i\n\n", vol); +// e_slider_value_set(win->slider, (double)vol); + } + e_slider_min_size_get(win->slider, &sw, &sh); if (sw < ow) sw = ow;
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_config.c Log Message: Forget todo basic apply in config dialog :) === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- e_mod_config.c 11 Sep 2006 11:21:43 - 1.5 +++ e_mod_config.c 11 Sep 2006 11:23:01 - 1.6 @@ -133,5 +133,11 @@ static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { + Config_Item *ci; + + ci = cfd->data; + ci->card_id = cfdata->card_id; + ci->channel_id = cfdata->channel_id; + e_config_save_queue(); return 1; } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: Makefile.am alsa_mixer.c alsa_mixer.h e_mod_config.c e_mod_main.c e_mod_main.h Added Files: e_mod_types.h Log Message: More virtualize work on alsa. Config dialog should be working now. === RCS file: /cvs/e/e_modules/mixer/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- Makefile.am 7 Sep 2006 16:03:29 - 1.4 +++ Makefile.am 11 Sep 2006 11:21:43 - 1.5 @@ -27,6 +27,7 @@ pkg_LTLIBRARIES= module.la module_la_SOURCES = e_mod_main.c \ e_mod_main.h \ + e_mod_types.h \ alsa_mixer.h \ alsa_mixer.c \ e_mod_config.c === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- alsa_mixer.c11 Sep 2006 09:54:10 - 1.3 +++ alsa_mixer.c11 Sep 2006 11:21:43 - 1.4 @@ -1,4 +1,5 @@ #include +#include "e_mod_types.h" #include "alsa_mixer.h" static int _alsa_get_hash (const char *name); @@ -27,7 +28,7 @@ for (i = 0; i < 32; i++) { - Alsa_Card *card; + Mixer_Card *card; snprintf(buf, sizeof(buf), "hw:%d", i); if ((err = snd_mixer_attach(handle, buf)) < 0) break; @@ -51,7 +52,7 @@ snd_ctl_close(control); - card = E_NEW(Alsa_Card, 1); + card = E_NEW(Mixer_Card, 1); if (!card) continue; card->name = evas_stringshare_add(buf); card->real = evas_stringshare_add(snd_ctl_card_info_get_name(hw_info)); @@ -73,7 +74,7 @@ while (cards) { - Alsa_Card *card; + Mixer_Card *card; card = cards->data; if (!card) continue; @@ -81,7 +82,7 @@ if (card->real) evas_stringshare_del(card->real); while (card->channels) { -Alsa_Channel *chan; +Mixer_Channel *chan; chan = card->channels->data; if (!chan) continue; @@ -114,7 +115,7 @@ for (i = 0; i < 32; i++) { - Alsa_Card *card; + Mixer_Card *card; snprintf(buf, sizeof(buf), "hw:%d", i); if ((err = snd_mixer_attach(handle, buf)) < 0) break; @@ -137,13 +138,15 @@ snd_ctl_close(control); - card = E_NEW(Alsa_Card, 1); + card = E_NEW(Mixer_Card, 1); if (!card) continue; card->name = evas_stringshare_add(buf); card->real = evas_stringshare_add(snd_ctl_card_info_get_name(hw_info)); card->id = _alsa_get_card_id(card->real); if (!_alsa_get_card_id(card->real) == id) continue; + + card->channels = alsa_card_get_channels(card); return card; } return NULL; @@ -152,7 +155,7 @@ Evas_List * alsa_card_get_channels(void *data) { - Alsa_Card*card; + Mixer_Card *card; Evas_List*channels; snd_mixer_t *handle; @@ -164,7 +167,7 @@ card = data; if (!card) return NULL; - + channels = NULL; snd_mixer_selem_id_alloca(&sid); @@ -219,13 +222,13 @@ if (snd_mixer_selem_has_playback_volume(elem)) { -Alsa_Channel *ac; +Mixer_Channel *ac; const char *name; name = snd_mixer_selem_id_get_name(sid); if ((!strcmp(name, "Master")) || (!strcmp(name, "PCM"))) { - ac = E_NEW(Alsa_Channel, 1); + ac = E_NEW(Mixer_Channel, 1); if (!ac) continue; ac->name = evas_stringshare_add(name); @@ -241,8 +244,8 @@ void * alsa_card_get_channel(void *data, int channel_id) { - Alsa_Card*card; - Alsa_Channel *chan; + Mixer_Card*card; + Mixer_Channel *chan; card = data; if (!card) return NULL; @@ -256,8 +259,8 @@ int alsa_get_volume(int card_id, int channel_id) { - Alsa_Card*card; - Alsa_Channel *chan; + Mixer_Card*card; + Mixer_Channel *chan; card = alsa_get_card(card_id); if (!card) return 0; @@ -271,8 +274,8 @@ int alsa_set_volume(int card_id, int channel_id, int vol) { - Alsa_Card*card; - Alsa_Channel *chan; + Mixer_Card*card; + Mixer_Channel *chan; card = alsa_get_card(card_id); if (!card) return 0; @@ -321,7 +324,7 @@ static void * _alsa_card_get_channel(void *data, int channel_id) { - Alsa_Card*card; + Mixer_Card*card; Evas_List*c; card = data; @@ -334,7 +337,7 @@ for (c = card->channels; c; c = c->next) { - Alsa_Chan
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c mixer.edc Log Message: Icon changes now when slider value changes to reflect current volume. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- e_mod_main.c11 Sep 2006 09:54:10 - 1.10 +++ e_mod_main.c11 Sep 2006 10:03:21 - 1.11 @@ -127,6 +127,7 @@ mixer->base = edje_object_add(gc->evas); edje_object_file_set(mixer->base, buf, "e/modules/mixer/main"); evas_object_show(mixer->base); + edje_object_signal_emit(mixer->base, "low", ""); _mixer_system_init(mixer); @@ -633,6 +634,13 @@ val = e_slider_value_get(obj); printf("Slider value: %f\n", val); mixer->mix_sys->set_volume(ci->card_id, ci->channel_id, (int)(val * 100)); + + if ((val * 100) < 33) + edje_object_signal_emit(mixer->base, "low", ""); + else if (((val * 100) >= 34) && ((val * 100) < 66)) + edje_object_signal_emit(mixer->base, "medium", ""); + else if ((val * 100) > 66) + edje_object_signal_emit(mixer->base, "high", ""); } /* Called when the simple window is resized */ === RCS file: /cvs/e/e_modules/mixer/mixer.edc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- mixer.edc 11 Sep 2006 09:06:50 - 1.3 +++ mixer.edc 11 Sep 2006 10:03:21 - 1.4 @@ -66,6 +66,37 @@ } } } /* end icon part */ - } /* end parts */ + } /* end parts */ + programs + { +program + { + name: "go_low"; + signal: "low"; + action: STATE_SET "low" 0.0; + target: "icon"; + } +program + { + name: "go_medium"; + signal: "medium"; + action: STATE_SET "medium" 0.0; + target: "icon"; + } +program + { + name: "go_high"; + signal: "high"; + action: STATE_SET "default" 0.0; + target: "icon"; + } +program + { + name: "go_mute"; + signal: "muted"; + action: STATE_SET "mute" 0.0; + target: "icon"; + } + } /* end programs */ } /* end group */ } /* end collections */ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c alsa_mixer.h e_mod_main.c Log Message: More virtualizing. Added get/set volume function protos for alsa. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- alsa_mixer.c11 Sep 2006 09:06:50 - 1.2 +++ alsa_mixer.c11 Sep 2006 09:54:10 - 1.3 @@ -1,10 +1,11 @@ #include #include "alsa_mixer.h" -static int _alsa_get_hash (const char *name); -static int _alsa_get_system_id (const char *name); -static int _alsa_get_card_id (const char *name); -static int _alsa_get_mixer_id (const char *name); +static int _alsa_get_hash (const char *name); +static int _alsa_get_system_id(const char *name); +static int _alsa_get_card_id (const char *name); +static int _alsa_get_mixer_id (const char *name); +static void *_alsa_card_get_channel (void *data, int channel_id); Evas_List * alsa_get_cards() @@ -237,6 +238,51 @@ return channels; } +void * +alsa_card_get_channel(void *data, int channel_id) +{ + Alsa_Card*card; + Alsa_Channel *chan; + + card = data; + if (!card) return NULL; + + chan = _alsa_card_get_channel(card, channel_id); + if (!chan) return NULL; + + return chan; +} + +int +alsa_get_volume(int card_id, int channel_id) +{ + Alsa_Card*card; + Alsa_Channel *chan; + + card = alsa_get_card(card_id); + if (!card) return 0; + + chan = _alsa_card_get_channel(card, channel_id); + if (!chan) return 0; + + printf("Get Volume\n"); +} + +int +alsa_set_volume(int card_id, int channel_id, int vol) +{ + Alsa_Card*card; + Alsa_Channel *chan; + + card = alsa_get_card(card_id); + if (!card) return 0; + + chan = _alsa_card_get_channel(card, channel_id); + if (!chan) return 0; + + printf("Set Volume: %i\n", vol); +} + /* Privates */ static int _alsa_get_hash(const char *name) @@ -272,3 +318,27 @@ return _alsa_get_hash(name); } +static void * +_alsa_card_get_channel(void *data, int channel_id) +{ + Alsa_Card*card; + Evas_List*c; + + card = data; + if (!card) return NULL; + + if (!card->channels) + card->channels = alsa_card_get_channels(card); + + if (!card->channels) return NULL; + + for (c = card->channels; c; c = c->next) + { + Alsa_Channel *chan; + + chan = c->data; + if (!chan) continue; + if (chan->id == channel_id) return chan; + } + return NULL; +} === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- alsa_mixer.h11 Sep 2006 09:06:50 - 1.2 +++ alsa_mixer.h11 Sep 2006 09:54:10 - 1.3 @@ -38,6 +38,10 @@ Evas_List *alsa_get_cards (void); void*alsa_get_card (int id); Evas_List *alsa_card_get_channels (void *data); +void*alsa_card_get_channel (void *data, int channel_id); void alsa_free_cards(void *data); + +int alsa_get_volume(int card_id, int channel_id); +int alsa_set_volume(int card_id, int channel_id, int vol); #endif === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- e_mod_main.c11 Sep 2006 09:06:50 - 1.9 +++ e_mod_main.c11 Sep 2006 09:54:10 - 1.10 @@ -51,8 +51,13 @@ { Evas_List *(*get_cards)(void); void *(*get_card) (int id); - Evas_List *(*get_channels) (void *card); - void (*free_cards) (void *cards); + Evas_List *(*get_channels) (void *data); + void *(*get_channel) (void *data, int card_id); + + int(*set_volume) (int card_id, int channel_id, int vol); + int(*get_volume) (int card_id, int channel_id); + + void (*free_cards) (void *data); Evas_List *cards; }; @@ -293,7 +298,11 @@ sys->get_cards = alsa_get_cards; sys->get_card = alsa_get_card; sys->get_channels = alsa_card_get_channels; + sys->get_channel = alsa_card_get_channel; sys->free_cards = alsa_free_cards; + + sys->get_volume = alsa_get_volume; + sys->set_volume = alsa_set_volume; #endif mixer->mix_sys = sys; @@ -307,8 +316,7 @@ sys = data; if (!sys) return; - if (sys->free_cards) - sys->free_cards(sys->cards); + if (sys->free_cards) sys->free_cards(sys->cards); E_FREE(sys); } @@ -426,10 +434,8 @@ Evas_Coord sw, sh; int cx, cy, cw, ch; - if (!inst || !inst->mixer) - return; - if (!(con = e_container_current_get(e_manager_current_get(
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: alsa_mixer.c alsa_mixer.h e_mod_config.c e_mod_main.c e_mod_main.h mixer.edc Log Message: Start of virtualizing sound stuffs. Should make doing alsa/oss/*bsd easier. === RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- alsa_mixer.c7 Sep 2006 15:26:17 - 1.1 +++ alsa_mixer.c11 Sep 2006 09:06:50 - 1.2 @@ -3,7 +3,8 @@ static int _alsa_get_hash (const char *name); static int _alsa_get_system_id (const char *name); -static int _alsa_get_mixer_id (const char *name); +static int _alsa_get_card_id (const char *name); +static int _alsa_get_mixer_id (const char *name); Evas_List * alsa_get_cards() @@ -53,7 +54,7 @@ if (!card) continue; card->name = evas_stringshare_add(buf); card->real = evas_stringshare_add(snd_ctl_card_info_get_name(hw_info)); - card->id = _alsa_get_mixer_id(card->real); + card->id = _alsa_get_card_id(card->real); cards = evas_list_append(cards, card); } @@ -62,8 +63,11 @@ } void -alsa_free_cards(Evas_List *cards) +alsa_free_cards(void *data) { + Evas_List *cards; + + cards = data; if (!cards) return; while (cards) @@ -74,10 +78,163 @@ if (!card) continue; if (card->name) evas_stringshare_del(card->name); if (card->real) evas_stringshare_del(card->real); + while (card->channels) + { +Alsa_Channel *chan; + +chan = card->channels->data; +if (!chan) continue; +if (chan->name) evas_stringshare_del(chan->name); +card->channels = evas_list_remove_list(card->channels, card->channels); +E_FREE(chan); + } + cards = evas_list_remove_list(cards, cards); E_FREE(card); + } +} + +void * +alsa_get_card(int id) +{ + Evas_List *cards = NULL; + snd_mixer_t *handle; + snd_ctl_t *control; + snd_ctl_card_info_t *hw_info; + int err, i; + char buf[1024]; + + if ((err = snd_mixer_open(&handle, 0)) < 0) + { + printf("Cannot open mixer: %s\n", snd_strerror(err)); + return NULL; + } + + snd_ctl_card_info_alloca(&hw_info); + + for (i = 0; i < 32; i++) + { + Alsa_Card *card; - cards = evas_list_remove_list(cards, cards); + snprintf(buf, sizeof(buf), "hw:%d", i); + if ((err = snd_mixer_attach(handle, buf)) < 0) break; + if ((err = snd_mixer_detach(handle, buf)) < 0) + { +snd_mixer_close(handle); +break; + } + if ((err = snd_ctl_open(&control, buf, 0)) < 0) + { +printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); +continue; + } + if ((err = snd_ctl_card_info(control, hw_info)) < 0) + { +printf("Cannot get hardware info: %s: %s\n", buf, snd_strerror(err)); +snd_ctl_close(control); +continue; + } + + snd_ctl_close(control); + + card = E_NEW(Alsa_Card, 1); + if (!card) continue; + card->name = evas_stringshare_add(buf); + card->real = evas_stringshare_add(snd_ctl_card_info_get_name(hw_info)); + card->id = _alsa_get_card_id(card->real); + + if (!_alsa_get_card_id(card->real) == id) continue; + return card; } + return NULL; +} + +Evas_List * +alsa_card_get_channels(void *data) +{ + Alsa_Card*card; + Evas_List*channels; + + snd_mixer_t *handle; + snd_ctl_t*control; + snd_ctl_card_info_t *hw_info; + snd_mixer_selem_id_t *sid; + snd_mixer_elem_t *elem; + int err, i; + + card = data; + if (!card) return NULL; + + channels = NULL; + + snd_mixer_selem_id_alloca(&sid); + snd_ctl_card_info_alloca(&hw_info); + + if ((err = snd_ctl_open(&control, card->name, 0)) < 0) + { + printf("\n\nCannot Open Card: %s %s\n\n", card->name, snd_strerror(err)); + return NULL; + } + + if ((err = snd_ctl_card_info(control, hw_info)) < 0) + { + printf("\n\nCannot get hardware info: %s %s\n\n", card->name, snd_strerror(err)); + snd_ctl_close(control); + return NULL; + } + + snd_ctl_close(control); + + if ((err = snd_mixer_open(&handle, 0)) < 0) + { + printf("\n\nCannot Open Mixer: %s\n\n", snd_strerror(err)); + return NULL; + } + + if ((err = snd_mixer_attach(handle, card->name)) < 0) + { + printf("\n\nCannot Attach Mixer: %s\n\n", snd_strerror(err)); + snd_mixer_close(handle); + return NULL; + } + + if (
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Test method for window closing. Needs current evas. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- e_mod_main.c7 Sep 2006 22:07:14 - 1.6 +++ e_mod_main.c8 Sep 2006 18:03:10 - 1.7 @@ -70,11 +70,12 @@ static void _mixer_menu_cb_configure (void *data, E_Menu *m, E_Menu_Item *mi); -static void _mixer_window_simple_pop_up (Instance *inst); -static int _mixer_window_simple_animator_cb (void *data); -static void _mixer_window_simple_mouse_up_cb (void *data, Evas *e, Evas_Object *obj, void *event_info); -static void _mixer_window_simple_changed_cb (void *data, Evas_Object *obj, void *event_info); -static void _mixer_window_simple_resize_cb (E_Win *win); +static void _mixer_window_simple_pop_up (Instance *inst); +static int _mixer_window_simple_animator_cb (void *data); +static void _mixer_window_simple_mouse_up_cb (void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _mixer_window_simple_mouse_out_cb (void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _mixer_window_simple_changed_cb (void *data, Evas_Object *obj, void *event_info); +static void _mixer_window_simple_resize_cb(E_Win *win); /* Private vars */ static E_Config_DD *conf_edd = NULL; @@ -193,7 +194,7 @@ Evas_Object *o; char buf[4096]; - snprintf (buf, sizeof(buf), "%s/module.eap", + snprintf(buf, sizeof(buf), "%s/module.eap", e_module_dir_get(mixer_config->module)); o = edje_object_add(evas); @@ -432,7 +433,16 @@ evas_object_show(win->event_obj); evas_object_event_callback_add(win->event_obj, EVAS_CALLBACK_MOUSE_UP, _mixer_window_simple_mouse_up_cb, win); - + + #ifdef DEBUG + /* Testing possible method for window destroy. It does work +* with an updated evas, as evas had some null check bugs +* (or lack of) which I fixed. Is this the behavior we're +* looking for ? */ +evas_object_event_callback_add(win->event_obj, EVAS_CALLBACK_MOUSE_OUT, + _mixer_window_simple_mouse_out_cb, win); +#endif + win->bg_obj = edje_object_add(e_win_evas_get(win->window)); e_theme_edje_object_set(win->bg_obj, "base/theme/menus", "e/widgets/menu/default/background"); @@ -511,7 +521,8 @@ } /* Makes the simple window slide */ -static int _mixer_window_simple_animator_cb(void *data) +static int +_mixer_window_simple_animator_cb(void *data) { Mixer_Win_Simple *win; double percent; @@ -532,6 +543,7 @@ if (h >= win->h) { + ecore_animator_del(win->slide_animator); win->slide_animator = NULL; return 0; } @@ -540,18 +552,62 @@ } /* Called when the background object of the simple window is released */ -static void _mixer_window_simple_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void +_mixer_window_simple_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { Mixer_Win_Simple *win; - if (!(win = data)) - return; + if (!(win = data)) return; printf("Mouse up\n"); } +static void +_mixer_window_simple_mouse_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Mixer_Win_Simple *win; + Mixer *mixer; + + if (!(win = data)) return; + + if (win->slide_animator) + { + ecore_animator_del(win->slide_animator); + win->slide_animator = NULL; + } + + if (win->slider) + { +evas_object_smart_callback_del(win->slider, "changed", + _mixer_window_simple_changed_cb); + evas_object_del(win->slider); + } + + if (win->bg_obj) + evas_object_del(win->bg_obj); + + if (win->event_obj) + { +evas_object_event_callback_del(win->event_obj, EVAS_CALLBACK_MOUSE_UP, + _mixer_window_simple_mouse_up_cb); +evas_object_event_callback_del(win->event_obj, EVAS_CALLBACK_MOUSE_OUT, + _mixer_window_simple_mouse_out_cb); + evas_object_del(win->event_obj); + } + + if (win->window) + e_object_del(E_OBJECT(win->window)); + + if (win->mixer) + { + mixer = win->mixer; + mixer->simple_win = NULL; + } +} + /* Called when the value of the slider of the simple window is changed */ -static void _mixer_window_simple_changed_cb(void *data, Evas_Object *obj, void *event_info) +static void +_mixer_window_simple_change
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.h Log Message: Change config item. Forgot to commit this. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_mod_main.h7 Sep 2006 13:46:25 - 1.2 +++ e_mod_main.h7 Sep 2006 16:36:59 - 1.3 @@ -16,7 +16,8 @@ struct _Config_Item { const char *id; - int volume; + + int card_id; }; EAPI extern E_Module_Api e_modapi; - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c e_mod_config.c Log Message: Allow selection of sound card that this mixer will control. If your testing, you'll need to remove old module.mixer.cfg === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_mod_main.c7 Sep 2006 16:07:54 - 1.4 +++ e_mod_main.c7 Sep 2006 16:36:34 - 1.5 @@ -85,7 +85,7 @@ card = c->data; if (!card) continue; -printf("\nFound Card: %s\n\n", card->real); +printf("\nFound Card: %s\tId: %i\n\n", card->real, card->id); } alsa_free_cards(c); } @@ -262,7 +262,7 @@ ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add(id); - ci->volume = 10; + ci->card_id = 0; mixer_config->items = evas_list_append(mixer_config->items, ci); return ci; @@ -282,7 +282,7 @@ #define T Config_Item #define D conf_item_edd E_CONFIG_VAL(D, T, id, STR); - E_CONFIG_VAL(D, T, volume, INT); + E_CONFIG_VAL(D, T, card_id, INT); conf_edd = E_CONFIG_DD_NEW("Mixer_Config", Config); #undef T @@ -300,7 +300,7 @@ ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add("0"); - ci->volume = 10; + ci->card_id = 0; mixer_config->items = evas_list_append(mixer_config->items, ci); } === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_mod_config.c 7 Sep 2006 16:03:29 - 1.2 +++ e_mod_config.c 7 Sep 2006 16:36:34 - 1.3 @@ -4,7 +4,9 @@ struct _E_Config_Dialog_Data { - + Evas_Object *list; + + int card_id; }; /* Protos */ @@ -44,7 +46,7 @@ static void _fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata) { - + cfdata->card_id = ci->card_id; } static void * @@ -70,15 +72,19 @@ static Evas_Object * _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) { - Evas_Object *o, *ol, *ot, *ob, *icon; + Evas_Object *o, *ol, *ot, *ob, *of, *icon; Evas_List *cards, *c; + Config_Item *ci; + int i = 0; + ci = cfd->data; + cards = alsa_get_cards(); - o = e_widget_list_add(evas, 0, 0); - ot = e_widget_table_add(evas, 0); - + o = e_widget_list_add(evas, 0, 1); + of = e_widget_framelist_add(evas, _("Sound Cards"), 0); ol = e_widget_ilist_add(evas, 48, 48, NULL); + cfdata->list = ol; e_widget_min_size_set(ol, 160, 200); if (cards) { @@ -87,23 +93,45 @@ Alsa_Card *card; card = c->data; -if (!c) continue; +if (!card) continue; e_widget_ilist_append(ol, NULL, card->real, NULL, NULL, NULL); +if (!ci) continue; +if (ci->card_id == card->id) + e_widget_ilist_selected_set(ol, i); +i++; } } e_widget_ilist_go(ol); - e_widget_table_object_append(ot, ol, 0, 0, 1, 1, 1, 0, 1, 0); + e_widget_framelist_object_append(of, ol); + e_widget_list_object_append(o, of, 1, 1, 0.5); + ot = e_widget_table_add(evas, 0); ob = e_widget_button_add(evas, _("Configure"), NULL, NULL, NULL, NULL); e_widget_disabled_set(ob, 1); - e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0); + e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 1, 0); - e_widget_list_object_append(o, ot, 1, 1, 0.5); + e_widget_list_object_append(o, ot, 1, 1, 0.0); return o; } static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { + Evas_List *cards, *c; + Alsa_Card *card; + Config_Item *ci; + + ci = cfd->data; + if (!ci) return 0; + + cards = alsa_get_cards(); + if (cards) + { + card = evas_list_nth(cards, e_widget_ilist_selected_get(cfdata->list)); + if (!card) return 0; + ci->card_id = card->id; + e_config_save_queue(); + } + return 1; } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Actually this should be disabled for now as alsa stuff is barely tested. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- e_mod_main.c7 Sep 2006 16:06:42 - 1.3 +++ e_mod_main.c7 Sep 2006 16:07:54 - 1.4 @@ -3,7 +3,7 @@ #include "alsa_mixer.h" /* Define to 1 for testing alsa code */ -#define DEBUG 1 +#define DEBUG 0 /* Gadcon Protos */ static E_Gadcon_Client *_gc_init (E_Gadcon * gc, const char *name, - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c Log Message: Hook in config dialog. === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_mod_main.c7 Sep 2006 13:46:25 - 1.2 +++ e_mod_main.c7 Sep 2006 16:06:42 - 1.3 @@ -1,5 +1,9 @@ #include #include "e_mod_main.h" +#include "alsa_mixer.h" + +/* Define to 1 for testing alsa code */ +#define DEBUG 1 /* Gadcon Protos */ static E_Gadcon_Client *_gc_init (E_Gadcon * gc, const char *name, @@ -12,11 +16,11 @@ /* Module Protos */ static Config_Item *_mixer_config_item_get (const char *id); static void _mixer_menu_cb_post (void *data, E_Menu *m); +static void _mixer_menu_cb_configure (void *data, E_Menu *m, + E_Menu_Item *mi); static void _mixer_cb_mouse_down (void *data, Evas *e, Evas_Object *obj, void *event_info); -static void _mixer_menu_cb_configure (void *data, E_Menu *m, - E_Menu_Item *mi); static void _mixer_window_show (void *data, int simple); static E_Config_DD *conf_edd = NULL; @@ -66,6 +70,26 @@ Mixer *mixer; E_Gadcon_Client *gcc; char buf[4096]; + +#if DEBUG + Evas_List *c; + + c = alsa_get_cards(); + if (c) + { + Evas_List *l; + + for (l = c; l; l = l->next) + { +Alsa_Card *card; + +card = c->data; +if (!card) continue; +printf("\nFound Card: %s\n\n", card->real); + } + alsa_free_cards(c); + } +#endif inst = E_NEW(Instance, 1); if (!inst) return NULL; @@ -175,8 +199,9 @@ mi = e_menu_item_new(mn); e_menu_item_label_set(mi, _("Configuration")); e_util_menu_item_edje_icon_set(mi, "enlightenment/configuration"); - // e_menu_item_callback_set (mi, _mixer_menu_cb_configure, inst); - + #if DEBUG + e_menu_item_callback_set(mi, _mixer_menu_cb_configure, inst); + #endif mi = e_menu_item_new(mn); e_menu_item_separator_set(mi, 1); @@ -207,6 +232,19 @@ if (!mixer_config->menu) return; e_object_del(E_OBJECT(mixer_config->menu)); mixer_config->menu = NULL; +} + +static void +_mixer_menu_cb_configure(void *data, E_Menu *m, E_Menu_Item *mi) +{ + Instance*inst; + Config_Item *ci; + + inst = data; + if (!inst) return; + ci = _mixer_config_item_get(inst->gcc->id); + if (!ci) return; + _config_mixer_module(ci); } static Config_Item * - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: Makefile.am e_mod_config.c Log Message: Start on config dialog. === RCS file: /cvs/e/e_modules/mixer/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Makefile.am 7 Sep 2006 15:26:47 - 1.3 +++ Makefile.am 7 Sep 2006 16:03:29 - 1.4 @@ -28,7 +28,8 @@ module_la_SOURCES = e_mod_main.c \ e_mod_main.h \ alsa_mixer.h \ - alsa_mixer.c + alsa_mixer.c \ + e_mod_config.c module_la_LIBADD = @e_libs@ @SOUND_LDFLAGS@ module_la_LDFLAGS = -module -avoid-version === RCS file: /cvs/e/e_modules/mixer/e_mod_config.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_mod_config.c 15 Aug 2006 02:33:01 - 1.1 +++ e_mod_config.c 7 Sep 2006 16:03:29 - 1.2 @@ -1,151 +1,109 @@ #include #include "e_mod_main.h" +#include "alsa_mixer.h" struct _E_Config_Dialog_Data { -// int resolution; + }; /* Protos */ -static void *_create_data (E_Config_Dialog * cfd); -static void _free_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata); -static Evas_Object *_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas, +static void*_create_data (E_Config_Dialog * cfd); +static void _free_data(E_Config_Dialog * cfd, + E_Config_Dialog_Data * cfdata); +static Evas_Object *_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas, + E_Config_Dialog_Data * cfdata); +static int _basic_apply_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata); -static int _basic_apply_data (E_Config_Dialog * cfd, - E_Config_Dialog_Data * cfdata); -static void onTimeCheckChange (void *data, Evas_Object * obj); -static void onDateCheckChange (void *data, Evas_Object * obj); void -_config_mixer_module (Config_Item * ci) +_config_mixer_module(Config_Item *ci) { - E_Config_Dialog *cfd; - E_Config_Dialog_View *v; - E_Container *con; - char buf[4096]; - - v = E_NEW (E_Config_Dialog_View, 1); - - v->create_cfdata = _create_data; - v->free_cfdata = _free_data; - v->basic.apply_cfdata = _basic_apply_data; - v->basic.create_widgets = _basic_create_widgets; - - snprintf (buf, sizeof (buf), "%s/module.eap", - e_module_dir_get (mixer_config->module)); - con = e_container_current_get (e_manager_current_get ()); - cfd = e_config_dialog_new (con, D_ ("Mixer Configuration"), "Mixer", "_e_modules_mixer_config_dialog", buf, 0, v, ci); - mixer_config->config_dialog = cfd; + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + E_Container *con; + char buf[4096]; + + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) return; + + v->create_cfdata = _create_data; + v->free_cfdata = _free_data; + v->basic.apply_cfdata = _basic_apply_data; + v->basic.create_widgets = _basic_create_widgets; + + snprintf(buf, sizeof(buf), "%s/module.eap", +e_module_dir_get(mixer_config->module)); + + con = e_container_current_get(e_manager_current_get()); + cfd = e_config_dialog_new(con, _("Mixer Configuration"), "Mixer", +"_mixer_config_dialog", buf, 0, v, ci); + mixer_config->config_dialog = cfd; } static void -_fill_data (Config_Item * ci, E_Config_Dialog_Data * cfdata) +_fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata) { -// cfdata->resolution = ci->resolution; + } static void * -_create_data (E_Config_Dialog * cfd) +_create_data(E_Config_Dialog *cfd) { - E_Config_Dialog_Data *cfdata; - Config_Item *ci; - - ci = cfd->data; - cfdata = E_NEW (E_Config_Dialog_Data, 1); + E_Config_Dialog_Data *cfdata; + Config_Item *ci; - _fill_data (ci, cfdata); - return cfdata; + ci = cfd->data; + cfdata = E_NEW(E_Config_Dialog_Data, 1); + _fill_data(ci, cfdata); + return cfdata; } static void -_free_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata) +_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { - if (!mixer_config) -return; - mixer_config->config_dialog = NULL; - free (cfdata); - cfdata = NULL; + if (!mixer_config) return; + mixer_config->config_dialog = NULL; + E_FREE(cfdata); } static Evas_Object * -_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas, - E_Config_Dialog_Data * cfdata) -{ - Evas_Object *o; -// Evas_Object *of, *ob, *time_entry, *time_check, *date_entry, *date_check; -// E_Radio_Group *rg; - - o = e_widget_list_add (evas, 0, 0); -/*
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: Makefile.am Log Message: Add alsa files to makefile.am === RCS file: /cvs/e/e_modules/mixer/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 7 Sep 2006 14:11:09 - 1.2 +++ Makefile.am 7 Sep 2006 15:26:47 - 1.3 @@ -26,7 +26,9 @@ pkgdir = $(datadir)/$(MODULE_ARCH) pkg_LTLIBRARIES= module.la module_la_SOURCES = e_mod_main.c \ - e_mod_main.h + e_mod_main.h \ + alsa_mixer.h \ + alsa_mixer.c module_la_LIBADD = @e_libs@ @SOUND_LDFLAGS@ module_la_LDFLAGS = -module -avoid-version - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Added Files: alsa_mixer.h alsa_mixer.c Log Message: Added start of alsa code to get card list. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: configure.in Log Message: Make this AC_MSG_ERROR for now as we only will support alsa for the time being, and without it fail the build. === RCS file: /cvs/e/e_modules/mixer/configure.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- configure.in7 Sep 2006 14:15:04 - 1.3 +++ configure.in7 Sep 2006 14:20:07 - 1.4 @@ -151,8 +151,7 @@ [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS" SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ], [ if test "x$enable_alsa" = "xyes"; then -AC_MSG_WARN([alsa library >= 1.0.9 not found]) -NOT_FOUND="$NOT_FOUND alsa,library,>=,1.0.9" +AC_MSG_ERROR([alsa library >= 1.0.9 not found]) fi ]) fi - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: configure.in Log Message: Some formatting of the configure.in. Oh, and downgrade required alsa version for fangy :) === RCS file: /cvs/e/e_modules/mixer/configure.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- configure.in7 Sep 2006 14:11:09 - 1.2 +++ configure.in7 Sep 2006 14:15:04 - 1.3 @@ -142,18 +142,18 @@ dnl Check for Alsa AC_ARG_ENABLE(alsa, - AC_HELP_STRING([--enable-alsa], [enable support for alsa(default=autodetect)]), - [ enable_alsa=$enableval ], - [ enable_alsa=default ]) + AC_HELP_STRING([--enable-alsa], + [enable support for alsa(default=autodetect)]), + [ enable_alsa=$enableval ], [ enable_alsa=default ]) if test "x$enable_alsa" = "xdefault" || test "x$enable_alsa" = "xyes"; then - AM_PATH_ALSA(1.0.11, + AM_PATH_ALSA(1.0.9, [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS" SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ], [ if test "x$enable_alsa" = "xyes"; then - AC_MSG_WARN([alsa library >= 1.0.11 not found]) - NOT_FOUND="$NOT_FOUND alsa,library,>=,1.0.11" - fi ]) +AC_MSG_WARN([alsa library >= 1.0.9 not found]) +NOT_FOUND="$NOT_FOUND alsa,library,>=,1.0.9" + fi ]) fi AC_SUBST(SOUND_CFLAGS) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: configure.in Makefile.am Log Message: Added checks for alsa. === RCS file: /cvs/e/e_modules/mixer/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- configure.in7 Sep 2006 13:46:25 - 1.1 +++ configure.in7 Sep 2006 14:11:09 - 1.2 @@ -140,6 +140,25 @@ AC_SUBST(e_libs) AC_SUBST(e_modules) +dnl Check for Alsa +AC_ARG_ENABLE(alsa, + AC_HELP_STRING([--enable-alsa], [enable support for alsa(default=autodetect)]), + [ enable_alsa=$enableval ], + [ enable_alsa=default ]) + +if test "x$enable_alsa" = "xdefault" || test "x$enable_alsa" = "xyes"; then + AM_PATH_ALSA(1.0.11, + [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS" + SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ], + [ if test "x$enable_alsa" = "xyes"; then + AC_MSG_WARN([alsa library >= 1.0.11 not found]) + NOT_FOUND="$NOT_FOUND alsa,library,>=,1.0.11" + fi ]) +fi + +AC_SUBST(SOUND_CFLAGS) +AC_SUBST(SOUND_LDFLAGS) + AC_OUTPUT([ Makefile ],[ === RCS file: /cvs/e/e_modules/mixer/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Makefile.am 7 Sep 2006 13:46:25 - 1.1 +++ Makefile.am 7 Sep 2006 14:11:09 - 1.2 @@ -20,6 +20,7 @@ INCLUDES = -I. \ -I$(top_srcdir) \ -I$(includedir) \ +@SOUND_CFLAGS@ \ @e_cflags@ pkgdir = $(datadir)/$(MODULE_ARCH) @@ -27,7 +28,7 @@ module_la_SOURCES = e_mod_main.c \ e_mod_main.h -module_la_LIBADD = @e_libs@ +module_la_LIBADD = @e_libs@ @SOUND_LDFLAGS@ module_la_LDFLAGS = -module -avoid-version module_la_DEPENDENCIES = $(top_builddir)/config.h - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Added Files: .cvsignore Log Message: added cvsignore for fangy :) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
E CVS: mixer devilhorns
Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer Dir : e_modules/mixer Modified Files: e_mod_main.c e_mod_main.h mixer.edc module.eap Added Files: AUTHORS COPYING COPYING-PLAIN ChangeLog INSTALL Makefile.am NEWS README autogen.sh config.h.in configure.in mixer-volume-high.png mixer-volume-low.png mixer-volume-medium.png mixer-volume-muted.png mute.png mute_active.png Log Message: Start of a mixer module. Don't bother building, it does nothing yet :) === RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_mod_main.c15 Aug 2006 02:33:01 - 1.1 +++ e_mod_main.c7 Sep 2006 13:46:25 - 1.2 @@ -1,385 +1,350 @@ #include #include "e_mod_main.h" -// #include "e_mixer.h" -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -/* Func Proto Requirements for Gadcon */ -static E_Gadcon_Client *_gc_init (E_Gadcon * gc, const char *name, - const char *id, const char *style); -static void _gc_shutdown (E_Gadcon_Client * gcc); -static void _gc_orient (E_Gadcon_Client * gcc); -static char *_gc_label (void); -static Evas_Object *_gc_icon (Evas * evas); + +/* Gadcon Protos */ +static E_Gadcon_Client *_gc_init (E_Gadcon * gc, const char *name, + const char *id, const char *style); +static void _gc_shutdown (E_Gadcon_Client * gcc); +static void _gc_orient (E_Gadcon_Client * gcc); +static char*_gc_label(void); +static Evas_Object *_gc_icon (Evas * evas); /* Module Protos */ -static void _mixer_cb_mouse_down (void *data, Evas * e, Evas_Object * obj, - void *event_info); -static void _mixer_menu_cb_configure (void *data, E_Menu * m, - E_Menu_Item * mi); -static void _mixer_menu_cb_post (void *data, E_Menu * m); -static int _mixer_cb_check (void *data); -static Config_Item *_mixer_config_item_get (const char *id); +static Config_Item *_mixer_config_item_get (const char *id); +static void _mixer_menu_cb_post (void *data, E_Menu *m); +static void _mixer_cb_mouse_down (void *data, Evas *e, + Evas_Object *obj, + void *event_info); +static void _mixer_menu_cb_configure (void *data, E_Menu *m, + E_Menu_Item *mi); +static void _mixer_window_show (void *data, int simple); static E_Config_DD *conf_edd = NULL; static E_Config_DD *conf_item_edd = NULL; Config *mixer_config = NULL; -/* Define the class and gadcon functions this module provides */ -static const E_Gadcon_Client_Class _gc_class = { - GADCON_CLIENT_CLASS_VERSION, - "mixer", {_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon} +static const E_Gadcon_Client_Class _gc_class = +{ + GADCON_CLIENT_CLASS_VERSION, "mixer", + {_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon}, + E_GADCON_CLIENT_STYLE_PLAIN }; typedef struct _Instance Instance; +typedef struct _Mixer Mixer; +typedef struct _Mixer_Win Mixer_Win; + struct _Instance { - E_Gadcon_Client *gcc; - Evas_Object *mixer; - Evas_Object *slider; - Ecore_Timer *check_timer; + E_Gadcon_Client *gcc; + Mixer *mixer; }; -static E_Gadcon_Client * -_gc_init (E_Gadcon * gc, const char *name, const char *id, const char *style) +struct _Mixer { - Evas_Object *o, *bar; - E_Gadcon_Client *gcc; - //Evas_List *mixer_system, *mixer_list, *mixer_elem_list; - //Mixer *mixer; - //Mixer_Elem *mixer_elem; - //int l, r; - Instance *inst; - char buf[4096]; - Config_Item *ci; - - inst = E_NEW (Instance, 1); - - ci = _mixer_config_item_get (id); - if (!ci->id) -ci->id = evas_stringshare_add (id); - - - o = edje_object_add (gc->evas); - snprintf (buf, sizeof (buf), "%s/mixer.edj", - e_module_dir_get (mixer_config->module)); - if (!e_theme_edje_object_set - (o, "base/theme/modules/mixer", "modules/mixer/main")) -edje_object_file_set (o, buf, "modules/mixer/main"); - - evas_object_show (o); - -/* - mixer_system = mixer_system_get_list(); - mixer_list = mixer_system_open(evas_list_data(mixer_system)); - mixer = evas_list_data(mixer_list); - mixer_elem_list = mixer->elems; - mixer_elem = evas_list_data(mixer_elem_list); - mixer_get_volume(mixer_elem, l, r); - ci->volume = l + r / 2; -*/ - - bar = e_widget_slider_add(gc->evas, 1, 0, _("%3.0f %%"), 0, 100, 1, 0, NULL, &ci->volume, 100); - edje_object_part_swallow(o, "mixerbar", bar); -// evas_object_pass_events_set(bar, 1); - evas_object_show (bar); - - gcc = e_gadcon_client_new (gc, name, id