forked from enlightenment/enlightenment
sorry jeremy - back out your patch. mier more broken than before.
SVN revision: 81382
This commit is contained in:
parent
69cb1822e1
commit
fec11b1b7d
|
@ -53,7 +53,6 @@ typedef struct E_Mixer_App_Dialog_Data
|
||||||
|
|
||||||
struct channel_info
|
struct channel_info
|
||||||
{
|
{
|
||||||
int is_mono;
|
|
||||||
int has_capture;
|
int has_capture;
|
||||||
const char *name;
|
const char *name;
|
||||||
E_Mixer_Channel *id;
|
E_Mixer_Channel *id;
|
||||||
|
@ -170,9 +169,7 @@ _populate_channel_editor(E_Mixer_App_Dialog_Data *app)
|
||||||
e_mod_mixer_state_get(app->sys, app->channel_info->id, &state);
|
e_mod_mixer_state_get(app->sys, app->channel_info->id, &state);
|
||||||
_update_channel_editor_state(app, state);
|
_update_channel_editor_state(app, state);
|
||||||
|
|
||||||
e_widget_disabled_set(ui->right, app->channel_info->is_mono);
|
app->lock_sliders = (state.left == state.right);
|
||||||
app->lock_sliders = ( (state.left == state.right) && !app->channel_info->is_mono );
|
|
||||||
e_widget_disabled_set(ui->lock_sliders, app->channel_info->is_mono);
|
|
||||||
e_widget_check_checked_set(ui->lock_sliders, app->lock_sliders);
|
e_widget_check_checked_set(ui->lock_sliders, app->lock_sliders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +211,6 @@ _channels_info_new(E_Mixer_System *sys)
|
||||||
info = malloc(sizeof(*info));
|
info = malloc(sizeof(*info));
|
||||||
info->id = l->data;
|
info->id = l->data;
|
||||||
info->name = e_mod_mixer_channel_name_get(sys, info->id);
|
info->name = e_mod_mixer_channel_name_get(sys, info->id);
|
||||||
info->is_mono = e_mod_mixer_mono_get(sys, info->id);
|
|
||||||
info->has_capture = e_mod_mixer_capture_get(sys, info->id);
|
info->has_capture = e_mod_mixer_capture_get(sys, info->id);
|
||||||
|
|
||||||
channels_infos = eina_list_append(channels_infos, info);
|
channels_infos = eina_list_append(channels_infos, info);
|
||||||
|
|
|
@ -19,7 +19,6 @@ E_Mixer_Mute_Get_Cb e_mod_mixer_mute_get;
|
||||||
E_Mixer_Mute_Set_Cb e_mod_mixer_mute_set;
|
E_Mixer_Mute_Set_Cb e_mod_mixer_mute_set;
|
||||||
E_Mixer_Capture_Cb e_mod_mixer_mutable_get;
|
E_Mixer_Capture_Cb e_mod_mixer_mutable_get;
|
||||||
E_Mixer_State_Get_Cb e_mod_mixer_state_get;
|
E_Mixer_State_Get_Cb e_mod_mixer_state_get;
|
||||||
E_Mixer_Capture_Cb e_mod_mixer_mono_get;
|
|
||||||
E_Mixer_Capture_Cb e_mod_mixer_capture_get;
|
E_Mixer_Capture_Cb e_mod_mixer_capture_get;
|
||||||
E_Mixer_Cb e_mod_mixer_new;
|
E_Mixer_Cb e_mod_mixer_new;
|
||||||
E_Mixer_Cb e_mod_mixer_del;
|
E_Mixer_Cb e_mod_mixer_del;
|
||||||
|
@ -1470,7 +1469,6 @@ e_mixer_default_setup(void)
|
||||||
e_mod_mixer_mute_set = (void *)e_mixer_system_set_mute;
|
e_mod_mixer_mute_set = (void *)e_mixer_system_set_mute;
|
||||||
e_mod_mixer_mutable_get = (void *)e_mixer_system_can_mute;
|
e_mod_mixer_mutable_get = (void *)e_mixer_system_can_mute;
|
||||||
e_mod_mixer_state_get = (void *)e_mixer_system_get_state;
|
e_mod_mixer_state_get = (void *)e_mixer_system_get_state;
|
||||||
e_mod_mixer_mono_get = (void *)e_mixer_system_is_mono;
|
|
||||||
e_mod_mixer_capture_get = (void *)e_mixer_system_has_capture;
|
e_mod_mixer_capture_get = (void *)e_mixer_system_has_capture;
|
||||||
e_mod_mixer_new = (void *)e_mixer_system_new;
|
e_mod_mixer_new = (void *)e_mixer_system_new;
|
||||||
e_mod_mixer_del = (void *)e_mixer_system_del;
|
e_mod_mixer_del = (void *)e_mixer_system_del;
|
||||||
|
@ -1501,7 +1499,6 @@ e_mixer_pulse_setup(void)
|
||||||
e_mod_mixer_mute_set = (void *)e_mixer_pulse_set_mute;
|
e_mod_mixer_mute_set = (void *)e_mixer_pulse_set_mute;
|
||||||
e_mod_mixer_mutable_get = (void *)e_mixer_pulse_can_mute;
|
e_mod_mixer_mutable_get = (void *)e_mixer_pulse_can_mute;
|
||||||
e_mod_mixer_state_get = (void *)e_mixer_pulse_get_state;
|
e_mod_mixer_state_get = (void *)e_mixer_pulse_get_state;
|
||||||
e_mod_mixer_mono_get = (void *)e_mixer_pulse_is_mono;
|
|
||||||
e_mod_mixer_capture_get = (void *)e_mixer_pulse_has_capture;
|
e_mod_mixer_capture_get = (void *)e_mixer_pulse_has_capture;
|
||||||
e_mod_mixer_new = (void *)e_mixer_pulse_new;
|
e_mod_mixer_new = (void *)e_mixer_pulse_new;
|
||||||
e_mod_mixer_del = (void *)e_mixer_pulse_del;
|
e_mod_mixer_del = (void *)e_mixer_pulse_del;
|
||||||
|
|
|
@ -111,7 +111,6 @@ extern E_Mixer_Mute_Get_Cb e_mod_mixer_mute_get;
|
||||||
extern E_Mixer_Mute_Set_Cb e_mod_mixer_mute_set;
|
extern E_Mixer_Mute_Set_Cb e_mod_mixer_mute_set;
|
||||||
extern E_Mixer_Capture_Cb e_mod_mixer_mutable_get;
|
extern E_Mixer_Capture_Cb e_mod_mixer_mutable_get;
|
||||||
extern E_Mixer_State_Get_Cb e_mod_mixer_state_get;
|
extern E_Mixer_State_Get_Cb e_mod_mixer_state_get;
|
||||||
extern E_Mixer_Capture_Cb e_mod_mixer_mono_get;
|
|
||||||
extern E_Mixer_Capture_Cb e_mod_mixer_capture_get;
|
extern E_Mixer_Capture_Cb e_mod_mixer_capture_get;
|
||||||
extern E_Mixer_Cb e_mod_mixer_new;
|
extern E_Mixer_Cb e_mod_mixer_new;
|
||||||
extern E_Mixer_Cb e_mod_mixer_del;
|
extern E_Mixer_Cb e_mod_mixer_del;
|
||||||
|
|
|
@ -43,7 +43,6 @@ int e_mixer_system_set_volume(E_Mixer_System *self, E_Mixer_Channel *channel, in
|
||||||
int e_mixer_system_get_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int *mute);
|
int e_mixer_system_get_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int *mute);
|
||||||
int e_mixer_system_set_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int mute);
|
int e_mixer_system_set_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int mute);
|
||||||
int e_mixer_system_can_mute(E_Mixer_System *self, E_Mixer_Channel *channel);
|
int e_mixer_system_can_mute(E_Mixer_System *self, E_Mixer_Channel *channel);
|
||||||
int e_mixer_system_is_mono(E_Mixer_System *self, E_Mixer_Channel *channel);
|
|
||||||
int e_mixer_system_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
|
int e_mixer_system_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
|
||||||
|
|
||||||
int pulse_init(void);
|
int pulse_init(void);
|
||||||
|
@ -71,7 +70,6 @@ int e_mixer_pulse_get_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int *
|
||||||
int e_mixer_pulse_set_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int mute);
|
int e_mixer_pulse_set_mute(E_Mixer_System *self, E_Mixer_Channel *channel, int mute);
|
||||||
int e_mixer_pulse_get_state(E_Mixer_System *self, E_Mixer_Channel *channel, E_Mixer_Channel_State *state);
|
int e_mixer_pulse_get_state(E_Mixer_System *self, E_Mixer_Channel *channel, E_Mixer_Channel_State *state);
|
||||||
int e_mixer_pulse_set_state(E_Mixer_System *self, E_Mixer_Channel *channel, const E_Mixer_Channel_State *state);
|
int e_mixer_pulse_set_state(E_Mixer_System *self, E_Mixer_Channel *channel, const E_Mixer_Channel_State *state);
|
||||||
int e_mixer_pulse_is_mono(E_Mixer_System *self, E_Mixer_Channel *channel);
|
|
||||||
int e_mixer_pulse_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
|
int e_mixer_pulse_has_capture(E_Mixer_System *self, E_Mixer_Channel *channel);
|
||||||
|
|
||||||
#endif /* E_MOD_SYSTEM_H */
|
#endif /* E_MOD_SYSTEM_H */
|
||||||
|
|
|
@ -473,15 +473,14 @@ e_mixer_system_get_volume(E_Mixer_System *self,
|
||||||
else
|
else
|
||||||
lvol = min;
|
lvol = min;
|
||||||
|
|
||||||
if (snd_mixer_selem_is_playback_mono(channel))
|
if (snd_mixer_selem_has_playback_channel(channel, 1))
|
||||||
rvol = min;
|
|
||||||
else if (snd_mixer_selem_has_playback_volume_joined(channel))
|
|
||||||
rvol = lvol;
|
|
||||||
else if (snd_mixer_selem_has_playback_channel(channel, 1))
|
|
||||||
snd_mixer_selem_get_playback_volume(channel, 1, &rvol);
|
snd_mixer_selem_get_playback_volume(channel, 1, &rvol);
|
||||||
else
|
else
|
||||||
rvol = min;
|
rvol = min;
|
||||||
|
|
||||||
|
if (snd_mixer_selem_is_playback_mono(channel) ||
|
||||||
|
snd_mixer_selem_has_playback_volume_joined(channel))
|
||||||
|
rvol = lvol;
|
||||||
|
|
||||||
*left = rint((double)(lvol - min) * 100 / (double)range);
|
*left = rint((double)(lvol - min) * 100 / (double)range);
|
||||||
*right = rint((double)(rvol - min) * 100 / (double)range);
|
*right = rint((double)(rvol - min) * 100 / (double)range);
|
||||||
|
@ -625,16 +624,6 @@ e_mixer_system_set_state(E_Mixer_System *self,
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
e_mixer_system_is_mono(E_Mixer_System *self,
|
|
||||||
E_Mixer_Channel *channel)
|
|
||||||
{
|
|
||||||
if ((!self) || (!channel))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return snd_mixer_selem_is_playback_mono(channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
e_mixer_system_has_capture(E_Mixer_System *self,
|
e_mixer_system_has_capture(E_Mixer_System *self,
|
||||||
E_Mixer_Channel *channel)
|
E_Mixer_Channel *channel)
|
||||||
|
@ -642,6 +631,6 @@ e_mixer_system_has_capture(E_Mixer_System *self,
|
||||||
if ((!self) || (!channel))
|
if ((!self) || (!channel))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return snd_mixer_selem_has_capture_volume(channel);
|
return snd_mixer_selem_has_capture_switch(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,12 +178,6 @@ e_mixer_system_set_state(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *chann
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
e_mixer_system_is_mono(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
e_mixer_system_has_capture(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
|
e_mixer_system_has_capture(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
|
||||||
{
|
{
|
||||||
|
|
|
@ -594,12 +594,6 @@ e_mixer_pulse_set_volume(E_Mixer_System *self, E_Mixer_Channel *channel, int lef
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
e_mixer_pulse_is_mono(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
e_mixer_pulse_can_mute(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
|
e_mixer_pulse_can_mute(E_Mixer_System *self __UNUSED__, E_Mixer_Channel *channel __UNUSED__)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue